/* public/css/profile.css */

/* Wrapper */
.profile-page{ margin:0 auto; padding:14px 0px 30px; max-width:720px; }

/* Status banner */
.profile-status{
  background:#064e3b;border:1px solid #34d399;color:#ecfdf5;border-radius:10px;
  padding:10px 12px;margin-bottom:14px;font-size:13px;
}

/* Top card */
.profile-top{
  border-radius:18px; overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  margin-bottom:16px;
}

/* Profile view cover image (only if exists) */
.profile-cover{
  width:100%; display:block;
  max-height:260px;
  object-fit:contain; object-position:center;
}

/* Edit page cover placeholder shell */
.cover-shell{
  position:relative; width:100%; height:180px;
  background: rgba(0,0,0,.22);
  border-bottom:1px solid rgba(255,255,255,.08);
  overflow:hidden;
}
.cover-shell img{
  width:100%; height:100%;
  object-fit:contain; object-position:center;
  display:block;
}
.cover-shell::after{
  content:""; position:absolute; inset:0;
  background: linear-gradient(to bottom, rgba(0,0,0,.00), rgba(0,0,0,.22));
  pointer-events:none;
}
.cover-placeholder{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  color: rgba(229,231,235,.70);
  font-size:13px; font-weight:800;
  letter-spacing:.02em;
}

/* Profile view: stretch cover image */
.profile-view .cover-shell img{
  object-fit:cover;
}

/* Body */
.profile-top__body{
  padding:16px 14px 18px;
  display:flex; flex-direction:column;
  align-items:center; text-align:center;
  gap:10px;
}

.profile-name{
  font-size:20px; font-weight:700;
  color:#f9fafb; line-height:1;
  margin:0;
}

.profile-username{
  font-size:14px; font-weight:400;
  color:#e5e7eb; opacity:.95;
  margin:0;
}

.profile-email{
  font-size:12.5px;
  color: rgba(229,231,235,.75);
  margin:0;
}

.profile-avatar{
  width:62px; height:62px;
  border-radius:999px;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  display:flex; align-items:center; justify-content:center;
}
.profile-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.profile-avatar__fallback{
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  font-size:34px; font-weight:900;
  color:#fff; opacity:.85;
}

.profile-bio{
  font-size:14px; color:#e5e7eb;
  line-height:1.5;
  margin:4px 0 0;
  max-width:560px;
}

/* Chips */
.profile-meta{
  margin-top:6px;
  display:flex; flex-wrap:wrap;
  justify-content:center;
  gap:8px;
}
.profile-chip{
  font-size:12px;
  color: rgba(229,231,235,.82);
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  padding:6px 10px;
  border-radius:999px;
}
.profile-link{ color:#93c5fd; text-decoration:none; }
.profile-link:hover{ text-decoration:underline; }

.readonly-row{
  width:100%; max-width:560px;
  display:flex; gap:10px; flex-wrap:wrap;
  justify-content:center;
  margin-top:6px;
}

/* Owner actions (profile page) */
.profile-actions{
  width:100%; max-width:560px;
  margin-top:10px;
  display:flex; flex-direction:column;
  gap:10px;
}
.profile-edit-btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px; text-decoration:none;
  height:40px; border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#fff; font-weight:800; font-size:13px;
}
.profile-edit-btn:hover{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.18);
}

.profile-media-box{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  text-align:left;
}
.profile-media-box__title{
  font-size:12px; font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(229,231,235,.85);
  margin-bottom:10px;
}
.profile-subtle{
  font-size:12px;
  color: rgba(229,231,235,.60);
  margin: -2px 0 6px;
}
.profile-form-row{
  display:flex; gap:8px;
  align-items:center;
  margin-bottom:10px;
}
.profile-form-row:last-child{ margin-bottom:0; }
.profile-file{ flex:1; font-size:12px; color:#e5e7eb; }
.profile-save{
  border:none; border-radius:999px;
  padding:7px 12px;
  font-size:12px; font-weight:900;
  background:#4f46e5; color:#fff;
  cursor:pointer; white-space:nowrap;
}
.profile-save:hover{ filter: brightness(1.05); }

/* Edit form card */
.edit-card{
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  padding:14px;
}
.edit-title{
  margin:2px 2px 12px;
  font-size:13px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(229,231,235,.85);
}

.edit-alert{
  border-radius:14px;
  padding:10px 12px;
  margin-bottom:14px;
  border:1px solid rgba(239,68,68,.45);
  background:rgba(127,29,29,.35);
  color:#fee2e2;
}
.edit-alert__title{ font-weight:900;font-size:13px;margin-bottom:6px; }
.edit-alert__list{ margin:0;padding-left:18px;font-size:13px;line-height:1.45; }

.edit-section{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.08);
}
.edit-section:first-child{ margin-top:0; padding-top:0; border-top:none; }

.edit-field{ margin-top:12px; width:100%; max-width:560px; }
.edit-field:first-child{ margin-top:0; }

.edit-field label{
  display:block;
  margin-bottom:6px;
  color:#cbd5e1;
  font-size:13px;
  font-weight:800;
  text-align:left;
}
.req{ color:#fca5a5; }

/* Glass inputs */
.edit-input, .edit-select, .edit-textarea{
  width:100%;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color:#e5e7eb;
  padding:12px 12px;
  outline:none;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
.edit-textarea{ resize:vertical; min-height:100px; }
.edit-input::placeholder, .edit-textarea::placeholder{ color: rgba(148,163,184,.70); }

.edit-input:focus, .edit-select:focus, .edit-textarea:focus{
  border-color: rgba(99,102,241,.75);
  box-shadow: 0 0 0 3px rgba(99,102,241,.18);
  background: rgba(255,255,255,.08);
}

/* Date picker improvements */
input[type="date"].edit-input{ padding-right:44px; }
input[type="date"].edit-input::-webkit-calendar-picker-indicator{
  opacity:.9; cursor:pointer;
  filter: invert(1) brightness(1.2);
}

.edit-err{ margin-top:6px; font-size:12px; color:#fca5a5; text-align:left; }

.edit-file{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px dashed rgba(255,255,255,.22);
  background: rgba(255,255,255,.04);
  color:#cbd5e1;
}

.preview-row{
  margin-top:10px;
  display:flex; gap:10px;
  flex-wrap:wrap;
  justify-content:center;
}
.preview{
  width:120px;height:80px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  overflow:hidden;
}
.preview img{ width:100%; height:100%; object-fit:cover; display:block; }
.preview--avatar{ width:72px; height:72px; border-radius:999px; }

.edit-actions{
  margin-top:16px;
  display:flex; gap:10px;
  justify-content:flex-end;
  align-items:center;
  flex-wrap:wrap;
}
.btn-ghost{
  text-decoration:none;
  display:inline-flex;align-items:center;justify-content:center;
  height:40px;padding:0 14px;border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#fff; font-weight:800; font-size:13px;
}
.btn-ghost:hover{ background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.18); }

.btn-primary{
  height:40px;padding:0 16px;border-radius:999px;
  border:1px solid rgba(99,102,241,.65);
  background: rgba(79,70,229,.28);
  color:#fff;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
}
.btn-primary:hover{ filter: brightness(1.05); }

@media (max-width: 520px){
  .profile-avatar{ width:86px; height:86px; }
  .profile-name{ font-size:17px; }
  .edit-card{ padding:12px; }
  .cover-shell{ height:160px; }
}
  /* keep your tabs style (already good) */
  .profile-tabs-wrap{ margin-top:4px; }

  .profile-tabs-top{
    display:flex; align-items:center; justify-content:space-between;
    gap:10px; flex-wrap:wrap; margin:8px 0 10px;
  }

  .profile-tabs{ display:flex; gap:8px; flex-wrap:wrap; margin:0; }
  .profile-tab{
    display:inline-flex; align-items:center; gap:8px;
    padding:6px 10px; border-radius:999px;
    border:1px solid rgba(148,163,184,.35);
    background: rgba(15,23,42,.55);
    color:#e5e7eb; font-size:13px; text-decoration:none;
    transition:transform .12s ease, background .12s ease;
  }
  .profile-tab:hover{ transform: translateY(-1px); background: rgba(15,23,42,.78); }
  .profile-tab.is-active{ border-color: rgba(99,102,241,.9); background: rgba(79,70,229,.18); }

  .profile-sort{ display:flex; align-items:center; gap:8px; }
  .profile-sort label{ font-size:12px; color: rgba(229,231,235,.75); }
  .profile-sort select{
    appearance:none; border:1px solid rgba(148,163,184,.35);
    background: rgba(15,23,42,.55); color:#e5e7eb;
    padding:8px 10px; border-radius:999px; font-size:12.5px; outline:none; cursor:pointer;
  }

  @media (max-width: 520px){
    .profile-avatar{ width:86px; height:86px; }
    .profile-name{ font-size:17px; }
  }
.profile-home-card{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  padding:12px;
  text-align:left;
}
.profile-home-title{
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(229,231,235,.85);
  margin-bottom:10px;
}
.profile-home-text{ color:#e5e7eb; font-size:14px; line-height:1.55; }
.profile-home-muted{ color: rgba(229,231,235,.60); font-size:13px; }
.profile-home-chips{ margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; }
