* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --success: #22c55e;
  --danger: #ef4444;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --sidebar-bg: #1e1b4b;
  --sidebar-text: #e0e7ff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hidden { display: none !important; }

/* ── Auth page ── */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-icon { font-size: 3rem; margin-bottom: 0.5rem; }

.auth-logo h1 {
  font-size: 1.75rem;
  color: var(--primary);
  font-weight: 700;
}

.auth-logo p {
  color: var(--muted);
  margin-top: 0.25rem;
}

.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: 0.75rem;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
}

.tab-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.form-group input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 0.75rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus { border-color: var(--primary); }

.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  min-height: 1.2rem;
}

.btn-primary {
  width: 100%;
  padding: 0.8rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: var(--primary-dark); }

/* ── App layout ── */
.app-body {
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.app-container {
  display: flex;
  height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 300px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--sidebar-text);
  font-size: 0.9rem;
  gap: 0.5rem;
}

.my-avatar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 0.5rem;
  transition: background 0.2s;
}
.my-avatar-wrapper:hover { background: rgba(255,255,255,0.1); }

.header-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.avatar.small {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.logout-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: var(--sidebar-text);
  padding: 0.3rem 0.7rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.logout-btn:hover { background: rgba(255,255,255,0.2); }

.search-box {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.search-box input {
  width: 100%;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 0.75rem;
  color: white;
  font-size: 0.9rem;
  outline: none;
}

.search-box input::placeholder { color: rgba(255,255,255,0.5); }

.contacts-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.contacts-list::-webkit-scrollbar { width: 4px; }
.contacts-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.contact-item:hover { background: rgba(255,255,255,0.08); }
.contact-item.active { background: rgba(255,255,255,0.15); }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-info { flex: 1; min-width: 0; }

.contact-name {
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-status {
  font-size: 0.78rem;
  margin-top: 0.1rem;
}

.contact-status.online { color: #86efac; }
.contact-status.offline { color: rgba(255,255,255,0.4); }

.badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.no-contacts {
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

/* ── Chat panel ── */
.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.welcome-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-content {
  text-align: center;
  color: var(--muted);
}

.welcome-icon { font-size: 4rem; margin-bottom: 1rem; }
.welcome-content h2 { color: var(--text); margin-bottom: 0.5rem; }

.chat-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  background: white;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-name-header {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

.call-btn-header {
  background: var(--success);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.call-btn-header.video { background: var(--primary); }
.call-btn-header:hover { opacity: 0.85; transform: scale(1.05); }

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #f8fafc;
}

.messages-area::-webkit-scrollbar { width: 5px; }
.messages-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.no-messages {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: auto;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 65%;
}

.message.sent {
  align-self: flex-end;
  align-items: flex-end;
}

.message.received {
  align-self: flex-start;
  align-items: flex-start;
}

.bubble {
  padding: 0.6rem 1rem;
  border-radius: 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
}

.message.sent .bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.message.received .bubble {
  background: white;
  color: var(--text);
  border-bottom-left-radius: 0.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.msg-time {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.2rem;
  padding: 0 0.25rem;
}

.message-input-area {
  background: white;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

#message-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 1.5rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

#message-input:focus { border-color: var(--primary); }

.send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.send-btn:hover { background: var(--primary-dark); }

/* ── Call overlay ── */
.call-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px);
  overflow: hidden;
}

.call-card {
  background: #1e1b4b;
  border-radius: 2rem;
  padding: 3rem 2.5rem;
  text-align: center;
  color: white;
  min-width: 280px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
  position: relative;
}

.call-card .avatar {
  width: 80px;
  height: 80px;
  font-size: 2rem;
  margin: 0 auto 1rem;
  background: var(--primary);
}

.call-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.call-status {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  min-height: 1.2rem;
}

.call-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.call-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, opacity 0.15s;
}

.call-btn:hover { transform: scale(1.1); }
.call-btn.accept { background: var(--success); }
.call-btn.end { background: var(--danger); }
.call-btn.mute,
.call-btn.camera { background: rgba(255,255,255,0.15); }

/* ── Video call ── */
.video-call {
  position: relative;
  width: min(95vw, 900px);
  height: min(85vh, 600px);
  background: #0f0f1a;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f0f1a;
  position: relative;
  z-index: 2;
}

.remote-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.avatar.big {
  width: 140px;
  height: 140px;
  font-size: 3.5rem;
  background: var(--primary);
}

.local-video {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 180px;
  height: 135px;
  border-radius: 1rem;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.3);
  background: #1e1b4b;
  z-index: 3;
  transform: scaleX(-1); /* effetto specchio */
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.local-video.off {
  background: #1e1b4b;
}

.call-info-top {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  z-index: 4;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.call-info-top .call-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.call-info-top .call-status {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0;
  min-height: auto;
}

.call-actions.floating {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: rgba(0,0,0,0.4);
  padding: 0.75rem;
  border-radius: 3rem;
  backdrop-filter: blur(8px);
}

/* ── Groups ── */
.section-label {
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem 0.25rem;
}

.sidebar-actions {
  padding: 0.5rem 0.75rem;
}

.create-group-btn {
  width: 100%;
  padding: 0.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px dashed rgba(255,255,255,0.25);
  color: var(--sidebar-text);
  border-radius: 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.create-group-btn:hover { background: rgba(255,255,255,0.15); }

.avatar.group-avatar {
  background: #7c3aed;
}

.msg-sender {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.15rem;
}

.group-members-list {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.group-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
  background: var(--bg);
  border-radius: 0.5rem;
  gap: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 0.75rem;
  font-size: 0.95rem;
  outline: none;
}
.form-input:focus { border-color: var(--primary); }

.checkbox-group {
  text-align: left;
}
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.checkbox-group small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.2rem;
  margin-left: 1.5rem;
}

.contact-name-header {
  cursor: default;
}
.chat-view .contact-name-header[onclick] {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

/* ── Back button (hidden on desktop) ── */
.back-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.25rem;
  line-height: 1;
}

/* ── Mobile layout ── */
@media (max-width: 768px) {
  .app-body {
    height: 100dvh;
  }

  .app-container {
    position: relative;
    height: 100dvh;
  }

  .sidebar {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    transition: transform 0.25s ease;
  }

  .chat-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    background: var(--bg);
    display: flex;
    flex-direction: column;
  }

  .chat-panel.mobile-open {
    transform: translateX(0);
  }

  .chat-view {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .chat-header {
    flex-shrink: 0;
    padding: 0.7rem 0.75rem;
  }

  .messages-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
  }

  .message-input-area {
    flex-shrink: 0;
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
  }

  .back-btn {
    display: block;
  }

  .welcome-screen {
    display: none !important;
  }

  /* Larger touch targets */
  .contact-item {
    padding: 0.85rem 1rem;
  }

  .message {
    max-width: 80%;
  }

  #message-input {
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  .call-btn-header {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  /* Call overlay - fixed to viewport, not affected by transforms */
  .call-overlay {
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    padding: 1rem;
  }

  .call-card {
    padding: 1.5rem 1.25rem;
    min-width: 0;
    width: 75vw;
    max-width: 260px;
    border-radius: 1.5rem;
  }

  .call-card .avatar {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
    margin: 0 auto 0.75rem;
  }

  .call-card .call-name {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }

  .call-card .call-status {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .call-card .call-actions {
    gap: 1.25rem;
  }

  .call-btn {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .video-call {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .local-video {
    width: 100px;
    height: 75px;
    bottom: 5.5rem;
    right: 0.75rem;
  }

  .avatar.big { width: 90px; height: 90px; font-size: 2.2rem; }

  .call-actions.floating {
    bottom: 1rem;
    gap: 1rem;
  }
}

/* ── Admin button in sidebar ── */
.admin-btn {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: none;
  padding: 0.3rem 0.7rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.admin-btn:hover { background: rgba(239, 68, 68, 0.35); }

/* ── Admin panel ── */
.admin-body {
  min-height: 100vh;
  background: var(--bg);
  padding: 1rem;
}

.admin-container {
  max-width: 800px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-header h1 {
  font-size: 1.5rem;
  color: var(--text);
}

.admin-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.admin-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.admin-section {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.admin-section h2 {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.admin-create-user {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-create-user input,
.admin-create-user select {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  outline: none;
}

.admin-create-user input { flex: 1; min-width: 120px; }

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 0.5rem;
  white-space: nowrap;
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-danger:hover { opacity: 0.85; }

.btn-copy {
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-copy:hover { opacity: 0.85; }

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: 0.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-item-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.admin-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.role-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  background: var(--border);
  color: var(--muted);
}
.role-badge.admin {
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary);
  font-weight: 600;
}

.role-select {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  font-size: 0.8rem;
  background: white;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}

.invite-result {
  margin: 1rem 0;
}

.invite-link-box {
  background: #eef2ff;
  border: 1.5px solid #c7d2fe;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.invite-link-box input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  font-size: 0.85rem;
  background: white;
}

.invite-token {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--muted);
}

.invite-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.invite-used { color: var(--muted); }
.invite-active { color: var(--success); font-weight: 500; }
.admin-empty { color: var(--muted); font-size: 0.9rem; padding: 0.5rem; }

@media (max-width: 768px) {
  .admin-body { padding: 0.5rem; }
  .admin-section { padding: 1rem; }
  .admin-create-user { flex-direction: column; }
  .admin-create-user input { min-width: auto; }
  .admin-item { flex-direction: column; align-items: flex-start; }
  .admin-item-actions { width: 100%; justify-content: flex-end; }
}

/* ── Profile modal ── */
.profile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.profile-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  text-align: center;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.profile-card h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.profile-avatar-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.profile-avatar-area .avatar.big {
  width: 100px;
  height: 100px;
  font-size: 2.5rem;
  cursor: default;
}

.profile-upload-btn {
  cursor: pointer;
  display: inline-block;
}

.profile-username {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 0.5rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--border); }

@media (max-width: 768px) {
  .profile-card {
    padding: 1.5rem;
    max-width: 280px;
  }
  .profile-avatar-area .avatar.big {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  z-index: 2000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
