body {
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 3rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ── Layout ── */
.layout {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 700px) {
  .layout { grid-template-columns: 1fr; }
}

/* ── Left column: card + quick presets stacked ── */
.left-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;          /* gap between card and quick-select */
}

/* ── Status card ── */
.status-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, background 0.3s;
}

.card-avatar {
  position: relative;
  background: #4a7cee;
  padding: 2rem 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  cursor: pointer;
  overflow: hidden;
}

.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-edit-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.card-avatar:hover .avatar-edit-hint {
  opacity: 1;
}

.avatar-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-icon svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: rgba(255,255,255,0.85);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.clickable-name {
  cursor: pointer;
  transition: filter 0.15s;
  position: relative;
}

.clickable-name:hover { filter: brightness(1.15); }

.edit-icon {
  font-size: 0.72rem;
  opacity: 0.55;
  margin-left: 6px;
  vertical-align: middle;
  transition: opacity 0.15s;
}

.clickable-name:hover .edit-icon { opacity: 1; }

.card-name {
  background: #3d6bda;
  padding: 0.8rem 1rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Clickable status bar */
.card-status-bar {
  padding: 0.9rem 2.2rem 0.9rem 1rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background 0.35s, color 0.35s, filter 0.15s, outline-color 0.15s;
  cursor: pointer;
  user-select: none;
  position: relative;

}

.card-status-bar::after {
  content: '✎';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  opacity: 0.55;
  transition: opacity 0.15s;
}

.card-status-bar:hover {
  filter: brightness(1.13);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.45);
}

html.light .card-status-bar:hover {
  box-shadow: inset 0 0 0 3px rgba(0,0,0,0.2);
}

.card-status-bar:hover::after { opacity: 1; }
.card-status-bar:active       { filter: brightness(0.9); }

/* ── Quick-select section (below status card, with gap from .left-col) ── */
.quick-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.1rem 1.2rem;
  transition: background 0.3s, border-color 0.3s;
}

.quick-section h2 {
  font-size: 1.05rem;        /* bigger heading */
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.9rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

/* ── Right panel ── */
.panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  transition: background 0.3s, border-color 0.3s;
}

.section h2 {
  font-size: 1.05rem;        /* bigger heading */
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1rem;
}

/* ── All clickable buttons ── */
.quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.7rem;
  border-radius: 9px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: filter 0.15s, transform 0.12s, box-shadow 0.15s, outline-color 0.15s;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.quick-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  outline-color: rgba(255,255,255,0.4);
}

html.light .quick-btn:hover { outline-color: rgba(0,0,0,0.2); }
.quick-btn:active { transform: scale(0.96); filter: brightness(0.95); }

/* ── Custom status form ── */
.custom-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.text-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
  border-radius: 9px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.text-input:focus {
  box-shadow: 0 0 0 3px rgba(74,140,255,0.2);
}

html.light .text-input:focus {
  box-shadow: 0 0 0 3px rgba(47,122,255,0.15);
}

/* Color swatches */
.color-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 4px 2px;
}

.color-row {
  padding: 4px 2px;   /* room for the ring without clipping */
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(128,128,128,0.2);
  cursor: pointer;
  transition: box-shadow 0.15s;
  flex-shrink: 0;
}

.color-swatch:hover {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.45);
}

html.light .color-swatch:hover {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.25);
}

.color-swatch.selected {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(255,255,255,0.85);
}

html.light .color-swatch.selected {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(0,0,0,0.55);
}

/* Form action buttons */
.form-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.apply-btn {
  padding: 0.62rem 1.3rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-family: sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.15s, outline-color 0.15s;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* ── Avatar-Crop-Modal ── */
.cropper-frame {
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  touch-action: none;
  cursor: grab;
}

.cropper-frame:active { cursor: grabbing; }

.cropper-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.cropper-img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  user-select: none;
  pointer-events: none;
}

.zoom-slider {
  width: 100%;
  accent-color: var(--accent);
}

.apply-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 3px 12px rgba(74,140,255,0.45);
  outline-color: rgba(74,140,255,0.5);
}

.apply-btn:active { transform: scale(0.97); }

.secondary-btn {
  padding: 0.62rem 1.3rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  font-family: sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.12s, box-shadow 0.15s, outline-color 0.15s;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.secondary-btn:hover {
  border-color: var(--border-hover);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  outline-color: var(--border-hover);
}

.secondary-btn:active { transform: scale(0.97); }

/* ── Saved statuses — 2-column grid like quick-select ── */
.saved-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.saved-item {
  display: flex;
  align-items: stretch;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: filter 0.15s, transform 0.12s, box-shadow 0.15s, outline-color 0.15s;
}

.saved-item:hover {
  filter: brightness(1.14);
  box-shadow: 0 4px 14px rgba(0,0,0,0.28);
  outline-color: rgba(255,255,255,0.5);
  transform: translateY(-1px);
}

html.light .saved-item:hover { outline-color: rgba(0,0,0,0.25); }
.saved-item:active { transform: scale(0.97) translateY(0); filter: brightness(0.95); }

.saved-item-label {
  flex: 1;
  padding: 0.58rem 0.6rem 0.58rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
  display: flex;
  align-items: center;
}

.saved-item-del {
  background: rgba(0,0,0,0.15);
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.45rem 0.55rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

/* Delete button turns red on hover — always, regardless of item color */
.saved-item-del:hover {
  background: #c0392b !important;
  color: #fff !important;
}

/* ── Logout button — reddish ── */
.logout-btn {
  background: rgba(231,76,60,0.12);
  border: 1px solid rgba(231,76,60,0.30);
  color: var(--danger);
  padding: 0.42rem 1rem;
  border-radius: 8px;
  font-family: sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.15s, outline-color 0.15s;
}

.logout-btn:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  box-shadow: 0 2px 10px rgba(231,76,60,0.4);
  outline-color: rgba(231,76,60,0.45);
}

/* ── Status-edit modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background 0.3s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.modal h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.modal-cancel {
  padding: 0.55rem 1.1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-family: sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: border-color 0.18s, background 0.18s, outline-color 0.15s;
}

.modal-cancel:hover {
  border-color: var(--border-hover);
  background: var(--surface);
  outline-color: var(--border-hover);
}

.modal-confirm {
  padding: 0.55rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: background 0.18s, box-shadow 0.15s, outline-color 0.15s;
}

.modal-confirm:hover {
  background: var(--accent-hover);
  box-shadow: 0 3px 12px rgba(74,140,255,0.45);
  outline-color: rgba(74,140,255,0.5);
}

/* ── Profile button (gear icon in navbar) ── */
/* .profile-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-sub);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-45deg);
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.3s;
  outline: 2px solid transparent;
  outline-offset: 2px;
} */

.profile-btn {
  transform: rotate(-45deg);
}

.profile-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
  outline-color: rgba(74,140,255,0.35);
  transform: rotate(0deg);
}

/* ── Profile modal tabs ── */
.profile-tabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.profile-tab {
  flex: 1;
  padding: 0.55rem 0.4rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-sub);
  font-family: sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

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

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

.profile-tab-content {
  min-height: 350px; /* konstante Modal-Größe über alle Tabs hinweg */
}

.profile-tab-pane { display: none; }
.profile-tab-pane.active { display: block; }

#tab-avatar.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.profile-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.profile-avatar-actions-row {
  display: flex;
  gap: 0.6rem;
}

.avatar-action-btn {
  flex: 1;
  padding: 0.6rem 0.8rem;
  text-align: center;
}

.avatar-remove-btn {
  width: 100%;
}

/* ── Profile modal internals ── */
.profile-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.profile-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.25rem 0;
}

.profile-pw-hint {
  font-size: 0.8rem;
  min-height: 1.1em;
  transition: color 0.2s;
}

.profile-pw-hint.error   { color: var(--danger); }
.profile-pw-hint.success { color: #27ae60; }

/* ── Admin nav button ── */
/* .admin-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-sub);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  outline: 2px solid transparent;
  outline-offset: 2px;
  text-decoration: none;
} */


.admin-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
  outline-color: rgba(74,140,255,0.35);
}

/* .user-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-sub);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  outline: 2px solid transparent;
  outline-offset: 2px;
  text-decoration: none;
} */

.user-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
  outline-color: rgba(74,140,255,0.35);
}


