/* ============================================================
   Ask D.I.E.T.E.R. — App-specific styles
   Extends main.css from ACOPA (do not override tokens)
   ============================================================ */

/* ─── Auth pages ─────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  padding: var(--pad);
}

.auth-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  padding: 48px;
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  margin-bottom: 32px;
  text-align: center;
}

.auth-logo img {
  height: 40px;
  width: auto;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin-bottom: 8px;
  color: var(--color-dark);
}

.auth-card .subtitle {
  color: var(--color-gray-500);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.auth-error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.auth-success {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ─── Form fields ────────────────────────────────────────── */
.field-group {
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-dark);
  background: var(--color-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(164, 196, 0, 0.15);
}

.field-textarea {
  min-height: 120px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Language tabs (DE / EN) */
.lang-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.lang-tab {
  padding: 4px 12px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--color-gray-500);
  transition: all 0.15s;
}

.lang-tab.active {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: var(--color-primary);
}

.lang-panel { display: none; }
.lang-panel.active { display: block; }

/* ─── App layout ─────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.app-sidebar {
  background: var(--color-dark);
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 0 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo img {
  height: 36px;
  width: auto;
}

.sidebar-logo .app-name {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--color-white);
  background: rgba(255,255,255,0.06);
}

.sidebar-nav a.active {
  border-left: 3px solid var(--color-primary);
  padding-left: 21px;
}

.sidebar-nav .nav-section {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 20px 24px 6px;
}

.app-main {
  background: var(--color-surface);
  padding: clamp(24px, 4vw, 48px);
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--color-dark);
  margin-bottom: 4px;
}

.page-header p {
  color: var(--color-gray-500);
  font-size: 0.95rem;
}

.impersonation-banner {
  background: #fef9c3;
  border: 1.5px solid #fde047;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #854d0e;
}

@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; left: -240px; z-index: 100; transition: left 0.25s; height: 100vh; }
  .app-sidebar.open { left: 0; }
  .app-main { padding: 16px; }
}

/* ─── Dashboard stats ────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--color-dark);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--color-gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

/* Completeness ring */
.completeness-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--color-primary) var(--pct), var(--color-gray-100) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.completeness-ring::after {
  content: '';
  width: 58px; height: 58px;
  background: var(--color-white);
  border-radius: 50%;
  position: absolute;
}

.completeness-ring .pct-label {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-dark);
}

/* ─── Content card ───────────────────────────────────────── */
.content-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 32px;
  margin-bottom: 24px;
}

.content-card h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-dark);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--color-gray-100);
}

/* ─── Dynamic lists (history, education, references) ─────── */
.dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.entry-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 20px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 16px;
  align-items: start;
  transition: box-shadow 0.2s;
  cursor: default;
}

.entry-card:hover {
  box-shadow: var(--shadow-card);
}

.drag-handle {
  color: var(--color-gray-300);
  cursor: grab;
  padding-top: 2px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drag-handle:active { cursor: grabbing; }

.entry-card.sortable-ghost {
  opacity: 0.4;
  border: 1.5px dashed var(--color-primary);
}

.entry-card.sortable-drag {
  box-shadow: var(--shadow-hover);
  opacity: 0.95;
}

.entry-meta {
  font-size: 0.8rem;
  color: var(--color-gray-400);
  margin-top: 4px;
}

.entry-title {
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 4px;
}

.entry-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  background: transparent;
  color: var(--color-gray-400);
  position: relative;
}

.btn-icon::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.btn-icon.btn-edit::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E"); }
.btn-icon.btn-delete::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 19a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7H6v12zM19 3a1 1 0 0 1-1 1H5a1 1 0 0 1 0-2h14a1 1 0 0 1 1 1z'/%3E%3C/svg%3E"); }
.btn-icon.btn-view::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4.5a11.5 11.5 0 0 1 10 6.5 11.5 11.5 0 0 1-20 0 11.5 11.5 0 0 1 10-6.5m0 3.5a3 3 0 1 1 0-6 3 3 0 0 1 0 6z'/%3E%3C/svg%3E"); }
.btn-icon.btn-login::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.76 0-8 1.35-8 6v3h16v-3c0-4.65-5.24-6-8-6z'/%3E%3C/svg%3E"); }

.btn-icon:hover { background: var(--color-gray-100); color: var(--color-dark); transform: scale(1.1); }
.btn-icon.btn-danger:hover { background: #fee2e2; color: #dc2626; }

/* Add-entry button */
.btn-add-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1.5px dashed var(--color-gray-200);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-gray-400);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}

.btn-add-entry:hover {
  border-color: var(--color-primary);
  color: var(--color-dark);
  background: rgba(164, 196, 0, 0.05);
}

/* Modal for add/edit entry */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--pad);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-hover);
  transform: translateY(12px);
  transition: transform 0.25s var(--ease-out-expo);
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 24px;
  color: var(--color-dark);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-gray-100);
}

/* ─── Skill tag input ────────────────────────────────────── */
.tag-input-wrap {
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 44px;
  cursor: text;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tag-input-wrap:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(164, 196, 0, 0.15);
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  color: var(--color-dark);
  padding: 3px 10px 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
}

.skill-tag .tag-remove {
  cursor: pointer;
  opacity: 0.6;
  font-size: 1rem;
  line-height: 1;
  background: none;
  border: none;
  color: inherit;
  padding: 0;
}

.skill-tag .tag-remove:hover { opacity: 1; }

.tag-input {
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  min-width: 120px;
  flex: 1;
  background: transparent;
}

.tag-autocomplete {
  position: absolute;
  background: var(--color-white);
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  top: calc(100% + 4px);
  left: 0;
}

.tag-autocomplete-item {
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--color-dark);
}

.tag-autocomplete-item:hover,
.tag-autocomplete-item.focused {
  background: rgba(164, 196, 0, 0.1);
}

/* ─── Skill swiper ───────────────────────────────────────── */
.swiper-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
}

.swiper-stack {
  position: relative;
  width: 320px;
  height: 420px;
  margin-bottom: 32px;
}

.skill-card {
  position: absolute;
  inset: 0;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  touch-action: none;
  user-select: none;
  cursor: grab;
  will-change: transform;
  border: 1.5px solid var(--color-gray-100);
}

.skill-card:active { cursor: grabbing; }

.skill-card .card-category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.skill-card .card-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.skill-card .card-hint {
  font-size: 0.85rem;
  color: var(--color-gray-400);
}

.skill-card .card-counter {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.75rem;
  color: var(--color-gray-300);
  font-weight: 600;
}

/* Behind cards (stack effect) */
.skill-card:nth-child(2) { transform: scale(0.96) translateY(8px); z-index: 0; }
.skill-card:nth-child(3) { transform: scale(0.92) translateY(16px); z-index: -1; }
.skill-card:first-child  { z-index: 10; }

/* Swipe decision overlays */
.card-overlay-yes,
.card-overlay-no {
  position: absolute;
  top: 24px;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
  border: 3px solid;
}

.card-overlay-yes { left: 24px; color: var(--color-primary); border-color: var(--color-primary); }
.card-overlay-no  { right: 24px; color: #dc2626; border-color: #dc2626; }

.swiper-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}

.swiper-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  background: var(--color-white);
  transition: all 0.2s;
  box-shadow: var(--shadow-card);
}

.swiper-btn-no  { border-color: #dc2626; color: #dc2626; }
.swiper-btn-yes { border-color: var(--color-primary); color: var(--color-primary); }
.swiper-btn:hover { transform: scale(1.1); box-shadow: var(--shadow-hover); }

/* Rating picker */
.rating-picker {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.star-btn {
  font-size: 2rem;
  cursor: pointer;
  color: var(--color-gray-200);
  border: none;
  background: none;
  transition: color 0.15s, transform 0.1s;
  padding: 4px;
}

.star-btn:hover,
.star-btn.active { color: var(--color-primary); }
.star-btn:hover  { transform: scale(1.15); }

/* Swipe out animations */
@keyframes swipe-right-out {
  to { transform: translateX(150%) rotate(20deg); opacity: 0; }
}
@keyframes swipe-left-out {
  to { transform: translateX(-150%) rotate(-20deg); opacity: 0; }
}

.card-exit-right { animation: swipe-right-out 0.35s var(--ease-out-expo) forwards; }
.card-exit-left  { animation: swipe-left-out  0.35s var(--ease-out-expo) forwards; }

.swiper-done {
  text-align: center;
  padding: 48px 24px;
}

.swiper-done .done-icon { font-size: 3rem; margin-bottom: 16px; }

/* ─── Skills list view ────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.skill-item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-item .skill-name { font-weight: 700; font-size: 0.95rem; color: var(--color-dark); }
.skill-item .skill-category { font-size: 0.75rem; color: var(--color-gray-400); }

.star-rating {
  display: flex;
  gap: 2px;
}

.star-rating .star { color: var(--color-gray-200); font-size: 0.9rem; }
.star-rating .star.filled { color: var(--color-primary); }

/* ─── Admin table ─────────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--color-surface);
  color: var(--color-gray-500);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--color-gray-100);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-gray-100);
  color: var(--color-dark);
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--color-surface); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-green  { background: #dcfce7; color: #16a34a; }
.badge-gray   { background: var(--color-gray-100); color: var(--color-gray-500); }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red    { background: #fee2e2; color: #dc2626; }

/* ─── Match score ────────────────────────────────────────── */
.selected-row td { background: rgba(164, 196, 0, 0.06) !important; }

.match-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.match-bar-track {
  flex: 1;
  height: 6px;
  background: var(--color-gray-100);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.match-bar-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  transition: width 0.6s var(--ease-out-expo);
}

.match-pct {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-dark);
  min-width: 40px;
  text-align: right;
}

/* ─── Availability grid ──────────────────────────────────── */
.availability-control {
  display: flex;
  align-items: center;
  gap: 16px;
}

.availability-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 200px;
  height: 6px;
  border-radius: 3px;
  background: var(--color-gray-200);
  outline: none;
}

.availability-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 2px solid var(--color-white);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.availability-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-dark);
  min-width: 48px;
}

/* ─── Toast notifications ────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  font-size: 0.9rem;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.25s var(--ease-out-expo);
}

.toast.success { border-left: 4px solid var(--color-primary); }
.toast.error   { border-left: 4px solid #dc2626; }

@keyframes toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ─── Skill tree (admin) ─────────────────────────────────── */
.skill-tree-category {
  margin-bottom: 24px;
}

.skill-tree-category h3 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-gray-100);
}

.skill-tree-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.skill-tree-item:hover { background: var(--color-surface); }

/* ─── CV preview ─────────────────────────────────────────── */
.cv-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.cv-preview-frame {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  padding: clamp(24px, 5vw, 48px);
  max-width: 794px;
  margin: 0 auto;
}

/* ─── btn-ghost fix: light/white app backgrounds ─────────── */
/* main.css .btn-ghost is designed for dark hero sections.    */
/* Override it wherever the background is white or surface.   */
.app-main .btn-ghost,
.modal-overlay .btn-ghost,
.auth-wrap .btn-ghost,
.auth-card .btn-ghost {
  color: var(--color-gray-700);
  border-color: var(--color-gray-200);
}

.app-main .btn-ghost:hover,
.modal-overlay .btn-ghost:hover,
.auth-wrap .btn-ghost:hover,
.auth-card .btn-ghost:hover {
  color: var(--color-dark);
  border-color: var(--color-gray-500);
  background: var(--color-gray-100);
  transform: translateY(-2px);
}

/* Mail/resend icon for invite actions */
.btn-icon.btn-mail::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 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-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

/* Link/copy icon for invite link */
.btn-icon.btn-link::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 1H8C6.34 1 5 2.34 5 4v16c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V4c0-1.66-1.34-3-3-3zm-2 20h-4v-1h4v1zm3-3H7V4h10v14z'/%3E%3C/svg%3E");
}

/* ─── Responsive sidebar toggle ──────────────────────────── */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 110;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-dark);
  color: var(--color-white);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-hover);
}

@media (max-width: 900px) {
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
}
