/* =========================
   Profil.css — clean & aligned
========================= */

.page-profil{
  background: var(--page-bg);
  color: var(--text);
}

.profil-main{
  padding: 28px 16px 92px;
  max-width: 1040px;
  margin: 0 auto;
}

/* Card */
.profil-card{
  border-radius: 22px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.profil-top{
  display:flex;
  justify-content: space-between;
  align-items:flex-start;
  gap: 16px;
}

.profil-user{
  display:flex;
  gap: 14px;
  align-items:flex-start;
  min-width: 0;
}

/* Avatar */
.profil-avatar{
  width: 66px;
  height: 66px;
  border-radius: 999px;
  display:grid;
  place-items:center;

  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2);
  color: var(--accent);
  box-shadow: 0 12px 22px rgba(15,23,42,0.10);

  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}

.profil-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

.profil-avatar .avatar-fallback{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-weight: 950;
  font-size: 16px;
}

/* Info */
.profil-info{ min-width: 0; }

.name-row{
  display:flex;
  align-items:center;
  gap: 10px;
}

.profile-name-badge{
  transform: translateY(1px);
}

.profil-name{
  margin: 0;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  line-height: 1.1;
  word-break: break-word;
}

.profil-meta{
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 700;
}

/* Primary button */
.profil-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  text-decoration:none;
  box-shadow: 0 18px 36px var(--accent-shadow), 0 14px 30px rgba(15,23,42,0.10);
  transition: transform 160ms cubic-bezier(.2,1.1,.2,1), filter 160ms ease;
}

.profil-btn:hover{ transform: translateY(-2px); filter: brightness(0.98); }
.profil-btn:active{ transform: translateY(-1px); }

.profil-btn.ghost{
  background: var(--surface-muted);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

.profil-btn.ghost:hover{
  background: var(--surface-muted-3);
  filter: none;
}

/* Controls row */
.profil-controls{
  margin-top: 12px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items:center;
}

/* Upload pill (fix: no ugly browser file input) */
.upload-hidden{
  position:absolute;
  width:1px; height:1px;
  opacity:0;
  pointer-events:none;
}

.upload-pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;

  height: 44px;
  padding: 0 12px;
  border-radius: 14px;

  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);

  font-weight: 900;
  cursor:pointer;

  transition: transform 160ms cubic-bezier(.2,1.1,.2,1),
              box-shadow 180ms ease,
              background 180ms ease;
}

.upload-pill:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  background: var(--surface-stronger);
  border-color: var(--border-strong);
}

.upload-pill:hover .upload-sub{
  background: var(--accent-soft-2);
  border-color: var(--accent-border-2);
}

.upload-title{
  font-size: 13px;
  opacity: .9;
}

.upload-sub{
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-2);
}

/* Pen button */
.icon-pill{
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: var(--surface-muted-2);
  border: 1px solid var(--border);
  color: var(--text-icon);
  cursor:pointer;

  transition: transform 160ms cubic-bezier(.2,1.1,.2,1),
              box-shadow 180ms ease,
              background 180ms ease,
              border-color 180ms ease;
}

.icon-pill svg{
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.icon-pill:hover{
  transform: translateY(-1px);
  background: var(--accent-soft);
  border-color: var(--accent-shadow);
  box-shadow: 0 10px 20px rgba(15,23,42,0.08);
}

/* Username editor */
.name-editor{
  margin-top: 10px;
  display:flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
}

.name-input{
  width: 100%;
  height: 44px;
  border-radius: 14px;
  padding: 0 12px;

  border: 1px solid var(--border);
  background: var(--surface-stronger);
  color: var(--text);

  font-weight: 900;
  outline: none;

  transition: box-shadow 180ms ease, border-color 180ms ease, transform 160ms cubic-bezier(.2,1.1,.2,1);
}

.name-input:focus{
  border-color: var(--accent-border-3);
  box-shadow: 0 0 0 5px var(--accent-soft-2);
  transform: translateY(-1px);
}

.name-input:disabled{
  opacity: .6;
  cursor:not-allowed;
}

.name-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-btn{
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 900;
  cursor:pointer;
  transition: transform 160ms cubic-bezier(.2,1.1,.2,1), filter 160ms ease, box-shadow 180ms ease;
}

.mini-btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 20px rgba(15,23,42,0.08); }
.mini-btn:active{ transform: translateY(0); }

.mini-btn.primary{
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-border-3);
}

.name-hint{
  font-size: 12px;
  color: var(--text-muted-2);
  font-weight: 700;
}

/* About */
.profil-about{ margin-top: 18px; }

.profil-label{
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.10em;
  color: var(--text-muted-2);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.profil-box{
  width: 100%;
  border-radius: 18px;
  padding: 14px;

  border: 1px solid var(--border);
  background: var(--surface-strong);

  color: var(--text);
  font-size: 14px;
  line-height: 1.65;

  resize: vertical;
  outline: none;

  box-shadow: var(--shadow-sm);
  transition: transform 160ms cubic-bezier(.2,1.1,.2,1),
              box-shadow 180ms ease,
              border-color 180ms ease,
              background 180ms ease;
}

.profil-box:focus{
  background: var(--surface-stronger);
  border-color: var(--accent-border-3);
  box-shadow: 0 0 0 5px var(--accent-soft-2), 0 16px 34px rgba(15,23,42,0.10);
  transform: translateY(-1px);
}

.profil-box[readonly]{
  background: var(--surface-muted);
  border-color: var(--border-soft);
  box-shadow: none;
  cursor: default;
}

.profil-box[readonly]:focus{
  box-shadow: none;
  transform: none;
}

/* Section title */
.profil-section-title{
  margin: 22px 0 12px;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

/* Events list */
.my-events{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.my-card{
  border-radius: 20px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  transition: transform 180ms cubic-bezier(.2,1.1,.2,1), box-shadow 180ms ease;
}

.my-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15,23,42,0.10);
}

.my-top{
  display:flex;
  gap: 12px;
  align-items:center;
}

.my-img{
  width: 84px;
  height: 64px;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid var(--border);
  background: var(--surface-muted-2);
  flex: 0 0 auto;
  display:grid;
  place-items:center;
}

.my-img img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.my-img-empty{
  width: 100%;
  height: 100%;
  background: var(--surface-muted-2);
}

.my-text{ min-width: 0; }

.my-title{
  margin: 0;
  font-weight: 950;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}

.my-meta{
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.my-place-link{
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.my-desc{
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}

@media (min-width: 860px){
  .my-events{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px){
  .profil-top{ flex-direction: column; align-items: stretch; }
  .profil-btn{ width: 100%; }
  .name-editor{ max-width: 100%; }
}

.my-title-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.my-del{
  height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--danger-border);
  background: var(--danger-soft);
  color: rgba(185,28,28,0.95);
  font-weight: 950;
  font-size: 12px;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(.2,1.1,.2,1),
              box-shadow 180ms ease,
              background 180ms ease,
              border-color 180ms ease;
}

.my-del:hover{
  transform: translateY(-1px);
  background: var(--danger-soft);
  border-color: var(--danger-border-strong);
  box-shadow: 0 10px 18px rgba(15,23,42,0.08);
}

.my-del:disabled{
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}



