body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    margin: 24px;
    background: #f7f7f7;
  }

  h1 { margin-bottom: 20px; }

.grid {
  display: grid;
  gap: 16px;

  grid-template-columns: repeat(auto-fill, minmax(350px, 420px));
  justify-content: start;   /* viktiga raden */
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.card.office {
  border-left: 6px solid #16a34a;
}
	
	/* extra subtil highlight */
	.card.office::before {
	  content: "";
	  position: absolute;
	  inset: 0;
	  border-radius: 14px;
	  pointer-events: none;
	}

  .card.me {
    border: 2px solid #111;
  }

  .name {
    font-weight: 700;
    font-size: 16px;
  }

  .meta {
    font-size: 13px;
    color: #555;
  }

  .pill {
    display: inline-block;
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    margin-right: 6px;
  }

	/* ===== Work location ===== */
	
	.pill.office {
	  background: #16a34a;
	  color: white;
	  border-color: #16a34a;
	}
	
	.pill.remote {
	  background: #dbeafe;
	  color: #1e3a8a;
	  border-color: #93c5fd;
	}
	
	/* ===== Presence status ===== */
	
	.pill.available {
	  background: #16a34a;
	  color: white;
	  border-color: #16a34a;
	}
	
	.pill.busy,
	.pill.inameeting,
	.pill.inacall,
	.pill.presenting {
	  background: #dc2626;
	  color: white;
	  border-color: #dc2626;
	}
	
	.pill.away {
	  background: #f59e0b;
	  color: white;
	  border-color: #f59e0b;
	}
	
	.pill.offline {
	  background: #e5e7eb;
	  color: #6b7280;
	  border-color: #e5e7eb;
	}

  .actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  button {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    background: #fff;
  }

  button.primary {
    border-color: #111;
  }

	button:disabled {
	  opacity: .6;
	  cursor: not-allowed;
	}
	
	button.active {
	  border-color: #111;
	  background: #111;
	  color: #fff;
	  box-shadow: 0 0 0 2px rgba(17,17,17,.12);
	}

	button:active {
		transform: translateY(1px);
	}

	button.active:disabled {
	  opacity: 1;              /* behåll tydligheten */
	}

.status-text {
  font-size: 13px;
  color: #374151;
  background: #f3f4f6;
  padding: 6px 8px;
  border-radius: 8px;
  line-height: 1.4;

  /* max 2 rader */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  margin-top: 4px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.me-compact {
  background: #fff;
  border: 2px solid #111;
  border-radius: 14px;
  padding: 10px 14px;

  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .me-compact {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.me-compact .left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.me-compact .right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #111;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9998;
}
.modal-backdrop.show { display: flex; }

.modal {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  display: grid;
  gap: 10px;
}
.modal h2 {
  margin: 0;
  font-size: 16px;
}
.modal textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
}
.modal .row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.chat-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid #ddd;
  border-radius:999px;
  text-decoration:none;
  color:#111;
  background:#fff;
  font-size:13px;
  line-height:1;
}

.chat-btn:hover{
  border-color:#bbb;
  background:#f7f7f7;
}

/* Filters-raden: se till att den är flex och kan bryta fint */
.filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

/* "Senast uppdaterad" längst till höger och kompakt */
.last-updated{
  margin-left:auto;
  font-size:12px;
  opacity:.65;
  white-space:nowrap;
}

