:root{
  --bg:#f6f7ff;
  --text:#121631;
  --muted:#5b678a;
  --line:rgba(18,22,49,.12);
  --accent:#ff3d86;
  --accent2:#6c5cff;
  --ok:#14c694;
  --shadow: 0 18px 50px rgba(16,24,40,.12);
  --radius2: 26px;
  --max: 1120px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 650px at 12% 8%, rgba(255,61,134,.20), transparent 55%),
    radial-gradient(900px 650px at 88% 12%, rgba(108,92,255,.18), transparent 60%),
    radial-gradient(900px 650px at 55% 110%, rgba(20,198,148,.14), transparent 55%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  color:var(--text);
  line-height:1.4;
  overflow-x:hidden;
}
a{color:inherit; text-decoration:none}
.wrap{max-width:var(--max); margin:0 auto; padding:0 18px}

.pill{
  display:inline-flex; gap:10px; align-items:center;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.65);
  color:var(--muted);
  font-size:13px;
}
.dot{width:8px;height:8px;border-radius:50%; background:var(--ok); box-shadow:0 0 0 6px rgba(20,198,148,.14)}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid transparent;
  font-weight:800;
  cursor:pointer;
  user-select:none;
  transition: transform .12s ease, filter .12s ease, background .12s ease, border-color .12s ease;
  white-space:nowrap;
}
.btn:active{transform:translateY(1px)}
.btn-primary{
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  color:white;
  box-shadow: 0 14px 34px rgba(255,61,134,.18);
}
.btn-primary:hover{filter:brightness(1.02)}
.btn-ghost{
  background:rgba(255,255,255,.75);
  border-color:var(--line);
  color:var(--text);
}
.btn-ghost:hover{background:rgba(255,255,255,.90)}
.btn-small{padding:9px 12px; border-radius:12px; font-size:14px}

/* Header */
header{
  position:sticky; top:0; z-index:40;
  backdrop-filter: blur(12px);
  background:rgba(246,247,255,.75);
  border-bottom:1px solid rgba(18,22,49,.10);
}
.nav{
  height:72px;
  display:flex; align-items:center; justify-content:space-between;
  gap:16px;
}
.brand{display:flex; align-items:center; gap:12px; font-weight:900; letter-spacing:.2px}
.brand-text { font-weight: 900; }
.logo{
  width:34px;height:34px;border-radius:12px;
  background: conic-gradient(from 210deg, var(--accent), var(--accent2), var(--ok), var(--accent));
  box-shadow: 0 10px 26px rgba(108,92,255,.16);
  position:relative;
}
.logo:after{
  content:"";
  position:absolute; inset:9px;
  border-radius:10px;
  background:rgba(255,255,255,.75);
  border:1px solid rgba(18,22,49,.10);
}
nav ul{list-style:none; display:flex; gap:18px; padding:0; margin:0; color:var(--muted); font-weight:700}
nav a{padding:10px 10px; border-radius:12px}
nav a:hover{background:rgba(255,255,255,.75); color:var(--text)}
.nav-actions{display:flex; align-items:center; gap:10px}
.burger{display:none}

/* Layout primitives */
main{padding-top:14px}
section{padding:22px 0}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
  border:1px solid rgba(18,22,49,.12);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
}
.section-title{
  display:flex; align-items:flex-end; justify-content:space-between; gap:12px;
  margin-bottom:14px;
}
.section-title h3{
  margin:0;
  font-size:22px;
  letter-spacing:-.25px;
}
.section-title p{margin:0; color:var(--muted); font-size:13px; max-width:65ch}

label{display:block; font-size:12px; color:var(--muted); margin:10px 0 6px}
input, select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(18,22,49,.14);
  background:rgba(255,255,255,.90);
  color:var(--text);
  outline:none;
}
input::placeholder{color:rgba(91,103,138,.65)}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px}

/* Search section */
.search-card{padding:18px}
.filter-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:12px;
  margin-top:10px;
}
.filter-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
  align-items:center;
  justify-content:space-between;
}
.results-pill{
  display:inline-flex; align-items:center; gap:10px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(18,22,49,.12);
  background:rgba(255,255,255,.75);
  color:var(--muted);
  font-size:13px;
}

/* Search section - Compact layout */
.search-card { padding: 14px 16px; }

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 100px;
}

.filter-group label {
    margin: 0 0 4px;
    font-size: 11px;
}

.filter-group input,
.filter-group select {
    padding: 10px 12px;
}

.filter-group-age {
    min-width: 140px;
}

.age-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

.age-range input {
    flex: 1;
    min-width: 0;
}

.age-separator {
    color: var(--muted);
    font-size: 14px;
}

.filter-actions-compact {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-start;
}

/* Keep old filter-grid for backwards compatibility */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    align-items: center;
    justify-content: space-between;
}

.results-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(18,22,49,.12);
    background: rgba(255,255,255,.75);
    color: var(--muted);
    font-size: 12px;
}

/* Members */
.tabs{display:flex; gap:8px; flex-wrap:wrap}
.tab{
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(18,22,49,.12);
  background:rgba(255,255,255,.72);
  color:var(--muted);
  font-weight:800;
  font-size:13px;
  cursor:pointer;
}
.tab[aria-selected="true"]{
  color:var(--text);
  background:rgba(255,255,255,.92);
  border-color: rgba(18,22,49,.18);
}
.profiles{display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-top:12px}
.profile{
  border-radius:20px;
  border:1px solid rgba(18,22,49,.10);
  background:rgba(255,255,255,.75);
  overflow:hidden;
  position:relative;
  min-height:210px;
  box-shadow: 0 10px 36px rgba(16,24,40,.08);
  display:flex;
  flex-direction:column;
}
.avatar{
  height:128px;
  background:
    radial-gradient(120px 90px at 30% 25%, rgba(255,61,134,.28), transparent 60%),
    radial-gradient(140px 100px at 70% 35%, rgba(108,92,255,.28), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,.85), rgba(255,255,255,.55));
  border-bottom:1px solid rgba(18,22,49,.10);
  position:relative;
}
.blur{
  position:absolute;
  left:10px; 
  bottom: -16px;
  padding:6px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.85);
  border:1px solid rgba(18,22,49,.10);
  backdrop-filter: blur(8px);
  font-size:11px;
  color:rgba(18,22,49,.82);
  white-space: nowrap;
  z-index: 1;
}
.profile .body{padding:14px}
.name{display:flex; justify-content:space-between; align-items:baseline; gap:10px}
.name b{font-size:15px}
.name span{color:var(--muted); font-size:12px}

.meta{
  margin-top:8px;
  font-size:12px;
  color:rgba(91,103,138,.95);
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.meta .chip{
  padding:6px 8px;
  border-radius:999px;
  border:1px solid rgba(18,22,49,.10);
  background:rgba(255,255,255,.78);
  color:rgba(18,22,49,.88);
  font-weight:700;
}

.profile .actions{
  display:flex;
  gap:8px;
  padding:12px 14px 14px;
  margin-top:auto;
}
.profile .actions .btn{flex:1}

/* Filtering visibility */
.profile.hidden{display:none !important}

 /* Announcements */
    /* Announcements — 2 columns: avatar + content (title/desc/meta) */
  .ann-card{ padding:6px 10px; }
  .ann-list{ display:flex; flex-direction:column; margin-top:12px; }

  .ann{
    display:grid;
    grid-template-columns:56px 1fr;
    gap:12px;
    align-items:start;
    padding:12px 8px;
    background:transparent;
    border:0;
    border-bottom:1px solid rgba(18,22,49,.10);
    border-radius:0;
    box-shadow:none;
  }
  .ann:last-child{ border-bottom:0; }

  .ann-avatar{
    width:56px; height:56px;
    border-radius:16px;
    border:1px solid rgba(18,22,49,.10);
    background:rgba(255,255,255,.75);
    object-fit:cover;
    display:block;
  }

  .ann-content{ min-width:0; }

  .ann-link{
    display:block;
    font-weight:900;
    font-size:15px;
    letter-spacing:-.1px;
    color:rgba(18,22,49,.95);
    line-height:1.25;
    margin:0;
    text-decoration:none;
  }
  .ann-link:hover{ text-decoration:underline; }

  .ann-desc{
    margin-top:6px;
    font-size:13px;
    color:rgba(91,103,138,.98);
    overflow:hidden;
    display:-webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .ann-meta{
    margin-top:8px;
    font-size:12px;
    color:rgba(91,103,138,.92);
    display:flex;
    flex-wrap:wrap;
    align-items:center;
  }
  .ann-meta span + span::before{
    content:"•";
    margin:0 8px;
    color:rgba(91,103,138,.55);
  }

  @media (max-width: 980px){
    .ann{ grid-template-columns:56px 1fr; }
  }

/* Footer */
footer{
  padding:28px 0 40px;
  border-top:1px solid rgba(18,22,49,.10);
  background:rgba(255,255,255,.55);
  margin-top:18px;
  backdrop-filter: blur(10px);
}
.foot-grid{
  display:grid; grid-template-columns: 1.2fr .8fr .8fr;
  gap:14px;
  color:var(--muted);
  font-size:13px;
}
.foot-grid h5{margin:0 0 10px; color:rgba(18,22,49,.92); font-size:13px}
.foot-grid a{color:var(--muted)}
.foot-grid a:hover{color:var(--text)}
.copy{margin-top:16px; color:rgba(91,103,138,.85); font-size:12px}

/* Modal */
.modal-backdrop{
  position:fixed; inset:0; z-index:60;
  background: rgba(16,24,40,.45);
  display:none;
  align-items:center; justify-content:center;
  padding:18px;
}
.modal{
  width:min(560px, 100%);
  border-radius: 22px;
  border:1px solid rgba(18,22,49,.14);
  background: linear-gradient(180deg, #ffffff, #f4f6ff);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal-head{
  padding:14px 16px;
  display:flex; justify-content:space-between; align-items:center;
  border-bottom:1px solid rgba(18,22,49,.10);
  background: #ffffff;
}
.modal-head b{letter-spacing:-.2px}
.x{
  width:34px;height:34px;border-radius:14px;
  border:1px solid rgba(18,22,49,.14);
  background:#ffffff;
  color:rgba(18,22,49,.92);
  cursor:pointer;
  display:grid; place-items:center;
}
.modal-body{padding:16px; background: #f8f9ff;}
.split{
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
  margin-top:12px;
}
.mini-row{display:flex; gap:10px; margin-top:12px; flex-wrap:wrap}
.mini-row .btn{flex:1}
.hint{font-size:12px; color:rgba(91,103,138,.90)}
.hr{height:1px; background:rgba(18,22,49,.10); margin:14px 0}

/* Profile Page */
.profile-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.profile-page .loading-container,
.profile-page .not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.profile-page .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
}

/* Left Column - Wrapper */
.profile-left {
    position: sticky;
    top: 90px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Left Column - Sidebar */
.profile-sidebar {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
    border: 1px solid rgba(18,22,49,.12);
    border-radius: var(--radius2);
    padding: 24px;
    box-shadow: var(--shadow);
}

.avatar-section {
    position: relative;
    margin-bottom: 20px;
}

.avatar-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(18,22,49,.10);
}

.avatar-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: white;
    font-weight: bold;
}

.profile-sidebar .online-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--ok);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(20,198,148,.25);
}

.basic-info {
    text-align: center;
    margin-bottom: 20px;
}

.profile-name {
    font-size: 24px;
    margin: 0 0 8px;
    color: var(--text);
    letter-spacing: -.25px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: var(--accent2);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    margin-left: 6px;
    vertical-align: middle;
}

.profile-age {
    color: var(--muted);
    margin: 0 0 8px;
    font-size: 16px;
}

.profile-location {
    color: var(--muted);
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.location-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235b678a'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
}

.message-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z'/%3E%3C/svg%3E");
}

.heart-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff3d86'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E");
}

.btn-secondary {
    background: rgba(255,255,255,.75);
    border: 1px solid var(--line);
    color: var(--text);
}

.btn-secondary:hover {
    background: rgba(255,255,255,.90);
}

.btn-full {
    width: 100%;
}

/* Right Column - Main Content */
.profile-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-main h3 {
    margin: 0 0 16px;
    color: var(--text);
    font-size: 18px;
    letter-spacing: -.2px;
}

/* Photo Gallery */
.photo-gallery {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
    border: 1px solid rgba(18,22,49,.12);
    border-radius: var(--radius2);
    padding: 24px;
    box-shadow: var(--shadow);
}

.photos-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) rgba(18,22,49,.08);
}

.photos-scroll::-webkit-scrollbar {
    height: 6px;
}

.photos-scroll::-webkit-scrollbar-track {
    background: rgba(18,22,49,.08);
    border-radius: 3px;
}

.photos-scroll::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.photo-item {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
    border: 1px solid rgba(18,22,49,.10);
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item.main-photo {
    border: 3px solid var(--accent);
}

.main-label {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* Profile Details */
.profile-details {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
    border: 1px solid rgba(18,22,49,.12);
    border-radius: var(--radius2);
    padding: 24px;
    box-shadow: var(--shadow);
}

.detail-card.bio {
    background: rgba(18,22,49,.04);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(18,22,49,.08);
}

.detail-card.bio p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.detail-value {
    font-size: 15px;
    color: var(--text);
}

.profile-page .chip {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(18,22,49,.10);
    background: rgba(255,255,255,.78);
    color: rgba(18,22,49,.88);
    font-weight: 700;
    font-size: 13px;
}

.interests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Activity Info */
.activity-info {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
    border: 1px solid rgba(18,22,49,.12);
    border-radius: var(--radius2);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.activity-info p {
    margin: 0;
}

/* Photo Modal */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16,24,40,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.photo-modal .modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.photo-modal .modal-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.photo-modal .close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
}

.photo-description {
    color: white;
    text-align: center;
    margin-top: 12px;
}

/* Profile Page - Edit Mode Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    margin: 0;
}

.edit-photo-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
    border-radius: 12px;
}

.edit-inline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-left: 8px;
    background: rgba(18,22,49,.06);
    border: 1px solid rgba(18,22,49,.10);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.edit-inline-btn:hover {
    background: rgba(18,22,49,.12);
}

.edit-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235b678a'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.edit-btn-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
}

.camera-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235b678a'%3E%3Cpath d='M12 15.2c1.87 0 3.4-1.52 3.4-3.4 0-1.87-1.52-3.4-3.4-3.4-1.87 0-3.4 1.52-3.4 3.4 0 1.87 1.53 3.4 3.4 3.4zM9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9z'/%3E%3C/svg%3E");
}

.btn-primary .camera-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 15.2c1.87 0 3.4-1.52 3.4-3.4 0-1.87-1.52-3.4-3.4-3.4-1.87 0-3.4 1.52-3.4 3.4 0 1.87 1.53 3.4 3.4 3.4zM9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9z'/%3E%3C/svg%3E");
}

.empty-state {
    text-align: center;
    padding: 32px 24px;
    color: var(--muted);
}

.empty-state p {
    margin: 0 0 16px;
}

.photo-gallery.empty-state {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.78));
    border: 2px dashed rgba(18,22,49,.15);
    border-radius: var(--radius2);
    box-shadow: none;
}

.detail-card.bio.empty-state {
    border: 2px dashed rgba(18,22,49,.12);
    background: rgba(18,22,49,.02);
    color: var(--muted);
    font-style: italic;
}

.detail-card.bio.empty-state p {
    margin-bottom: 12px;
}

.modal-backdrop {
    display: flex;
}

.modal-large {
    width: min(680px, 100%);
}

.bio-textarea {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(18,22,49,.14);
    background: rgba(255,255,255,.90);
    color: var(--text);
    outline: none;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.bio-textarea::placeholder {
    color: rgba(91,103,138,.65);
}

.error-message {
    color: var(--accent);
    font-size: 13px;
    margin: 12px 0 0;
    padding: 10px 12px;
    background: rgba(255,61,134,.08);
    border-radius: 10px;
    border: 1px solid rgba(255,61,134,.15);
}

.modal-body label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin: 14px 0 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-body label:first-child {
    margin-top: 0;
}

.modal-body .split {
    margin-top: 0;
}

.modal-body .split label {
    margin-top: 0;
}

.modal-body .mini-row {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(18,22,49,.10);
}

.modal-body .hint {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Photo Manager - Pending Items (JavaScript rendered) */
.pending-section {
    margin-bottom: 20px;
}

.pending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.pending-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,.75);
    border: 1px solid rgba(18,22,49,.12);
    aspect-ratio: 1;
}

.pending-item.has-error {
    border-color: var(--accent);
    background: rgba(255,61,134,.05);
}

.pending-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pending-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18,22,49,.05);
}

.pending-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pending-name {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pending-size,
.pending-status {
    font-size: 10px;
    opacity: 0.8;
}

.pending-error {
    font-size: 10px;
    color: #ff8a8a;
}

.pending-item .remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
    line-height: 1;
    padding: 0;
}

.pending-item:hover .remove-btn {
    opacity: 1;
}

.pending-item .remove-btn:hover {
    background: rgba(255,61,134,.9);
}

.file-icon {
    width: 32px;
    height: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235b678a'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.section-header-small {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

/* Drop zone dragging state */
.drop-zone.dragging {
    border-color: var(--accent2) !important;
    background: rgba(108,92,255,.15) !important;
    border-style: solid !important;
}

/* ============================================
   RESPONSIVE / MOBILE STYLES
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 980px) {
    /* Header */
    nav ul { display: none; }
    .burger { display: inline-flex; }
    .nav-actions .btn { display: none; }
    .nav-actions .burger,
    .nav-actions .user-link { display: inline-flex; }
    
    /* Profile cards - 2 columns */
    .profiles { grid-template-columns: repeat(2, 1fr); }
    
    /* Footer - 2 columns */
    .foot-grid { grid-template-columns: 1fr 1fr; }
    
    /* Filter grid - 2 columns */
    .filter-grid { grid-template-columns: 1fr 1fr; }
    
    /* Announcements */
    .ann { grid-template-columns: 56px 1fr; }
    
    /* Profile page - stack sidebar and main */
    .profile-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .profile-sidebar {
        position: static;
        max-width: 100%;
        margin: 0;
    }
    
    /* Activity info - stack on tablet */
    .activity-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    /* Search - wrap to 2 rows */
    .filter-row {
        gap: 10px;
    }
    
    .filter-group {
        min-width: calc(33% - 10px);
    }
}

/* Mobile breakpoint */
@media (max-width: 520px) {
    /* Wrapper padding */
    .wrap { padding: 0 12px; }
    
    /* Header - keep brand visible */
    .nav { height: 60px; gap: 10px; }
    .logo { width: 30px; height: 30px; }
    .brand { gap: 8px; }
    .brand-text { font-size: 15px; }
    
    /* Buttons */
    .btn { padding: 10px 14px; font-size: 14px; }
    .btn-small { padding: 8px 10px; font-size: 13px; }
    
    /* Profile cards - 1 column */
    .profiles { grid-template-columns: 1fr; }
    
    /* Footer - 1 column */
    .foot-grid { grid-template-columns: 1fr; }
    
    /* Filter grid - 1 column */
    .filter-grid { grid-template-columns: 1fr; }
    .filter-actions { 
        flex-direction: column;
        align-items: stretch;
    }
    .filter-actions .btn { width: 100%; }
    
    /* Modal split fields - 1 column */
    .split { grid-template-columns: 1fr; }
    
    /* Grid2 - 1 column */
    .grid2 { grid-template-columns: 1fr; }
    
    /* Section title - stack */
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Profile page */
    .profile-page { padding: 12px; }
    
    .profile-sidebar {
        padding: 16px;
        max-width: 100%;
    }
    
    .profile-name { font-size: 20px; }
    
    .avatar-placeholder { font-size: 48px; }
    
    /* Photo gallery */
    .photo-gallery { padding: 16px; }
    
    .photo-item {
        width: 120px;
        height: 120px;
    }
    
    /* Profile details */
    .profile-details { padding: 16px; }
    
    .details-grid { grid-template-columns: 1fr; }
    
    .detail-card.bio { padding: 12px; }
    
    /* Activity info */
    .activity-info {
        padding: 14px 16px;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
    
    /* Modal */
    .modal-backdrop { padding: 10px; }
    .modal { border-radius: 18px; }
    .modal-head { padding: 12px 14px; }
    .modal-body { padding: 14px; }
    
    /* Tabs - wrap */
    .tabs { gap: 6px; }
    .tab { padding: 6px 8px; font-size: 12px; }
    
    /* Pending grid - 2 columns on small mobile */
    .pending-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    /* Existing photos grid */
    .existing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* User link */
    .user-name { display: none; }
    .user-link { padding: 6px; }
    
    /* Announcements */
    .ann { 
        grid-template-columns: 48px 1fr;
        gap: 10px;
        padding: 10px 6px;
    }
    .ann-avatar { width: 48px; height: 48px; }
    .ann-link { font-size: 14px; }
    .ann-desc { font-size: 12px; }
    
    /* Search card */
    .search-card { padding: 14px; }
}

/* Very small mobile */
@media (max-width: 360px) {
    .wrap { padding: 0 10px; }
    
    .profiles { gap: 10px; }
    
    .profile { min-height: 180px; }
    .avatar { height: 100px; }
    .profile .body { padding: 10px; }
    .name b { font-size: 14px; }
    
    .blur {
        font-size: 10px;
        padding: 5px 8px;
        left: 8px;
        bottom: -14px;
    }
    
    .pending-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .photo-item {
        width: 100px;
        height: 100px;
    }
    
    .btn { padding: 9px 12px; }
}

/* Fix background on mobile */
@media (max-width: 980px) {
    body { background-attachment: scroll; }
}
