/* Basestil – baggrund, font osv. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #eef3f6;
  /* lys grå/blå baggrund */
  color: #0f172a;
  /* mørk tekst */
}

/* App layout */
.app-shell {
  min-height: 100vh;
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: #ffffff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #e5e7eb;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #064e3b;
  /* mørk grøn */
  color: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.brand-name {
  font-weight: 600;
  color: #111827;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  padding: 10px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #4b5563;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.nav-item.active {
  background: #ecfdf5;
  color: #166534;
  font-weight: 600;
}

.nav-item:hover {
  background: #f3f4f6;
}

.user {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #f9fafb;
}

.rooms-section {
  margin-top: 24px;
}

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 6px;
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.room-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f9fafb;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}

.room-item:hover {
  background: #f3f4f6;
}

.room-item.active {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
  font-weight: 600;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #d1fae5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #065f46;
}

.user-name {
  font-size: 14px;
  color: #111827;
}

/* Main area */
.main-area {
  flex: 1;
  padding: 32px 40px;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.subtitle {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 14px;
}

/* Knapper */
.primary-btn,
.secondary-btn {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

.primary-btn {
  background: #22c55e;
  /* grøn */
  color: #064e3b;
  font-weight: 600;
}

.primary-btn:hover {
  background: #16a34a;
}

.secondary-btn {
  background: #f3f4f6;
  color: #111827;
}

.secondary-btn:hover {
  background: #e5e7eb;
}

/* Chat card */
.chat-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px 24px 20px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.06);
  max-width: 720px;
}

.chat-header h2 {
  margin: 0;
  font-size: 18px;
}

.chat-subtitle {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 14px;
}

/* Chat indhold */
.chat-content {
  margin-top: 16px;
  border-radius: 16px;
  background: #f9fafb;
  padding: 16px;
  max-height: 360px;
  overflow-y: auto;
}

/* Beskeder */
#messages {
  list-style: none;
  padding: 0;
  margin: 0;
}

#messages li {
  background: #ffffff;
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 14px;
  border: 1px solid #e5e7eb;
}

/* Footer / forms */
.chat-footer {
  margin-top: 16px;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.username-form,
.message-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.username-form label,
.message-form label {
  font-size: 13px;
  color: #6b7280;
}

.input-row {
  display: flex;
  gap: 8px;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input#input,
input#username {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 1px #22c55e33;
}