/*
 * New meeting form. Shell (sidebar, topbar, cards) comes from dashboard.css,
 * which must be loaded first.
 */

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 1080px) { .form-grid { grid-template-columns: 1fr; } }

.card-body { padding: 1.2rem; }

.field { margin-bottom: 1.15rem; }
.field:last-child { margin-bottom: 0; }
.field-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: .4rem;
}
.field-label .req { color: var(--garnet); margin-left: .15rem; }
.field-hint { font-size: .76rem; color: var(--ink-faint); margin-top: .35rem; }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .88rem;
  padding: .55rem .7rem;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.input.is-invalid, .select.is-invalid { border-color: var(--garnet); }
.field-error { font-size: .76rem; color: var(--garnet); margin-top: .35rem; }

.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.readonly-value {
  font-size: .9rem;
  font-weight: 600;
  padding: .55rem .7rem;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Meeting type as selectable cards rather than bare radios */
.type-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 640px) { .type-options { grid-template-columns: 1fr; } }
.type-option {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: .8rem .9rem;
  cursor: pointer;
  display: flex;
  gap: .6rem;
  align-items: flex-start;
}
.type-option:hover { border-color: var(--accent); }
.type-option.selected { border-color: var(--accent); background: var(--accent-soft); }
.type-option input { accent-color: var(--accent); margin-top: .15rem; flex-shrink: 0; }
.type-option .t-title { font-size: .85rem; font-weight: 600; }
.type-option .t-sub { font-size: .74rem; color: var(--ink-muted); margin-top: .1rem; }

/* Duration readout */
.duration-note {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 99px;
  padding: .2rem .65rem;
}
.duration-note.invalid { color: var(--garnet); background: var(--garnet-soft); }

/* Invitees */
.invitee-toolbar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .6rem;
  flex-wrap: wrap;
}
.invitee-search { flex: 1; min-width: 160px; }
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  padding: .2rem .3rem;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.invitee-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-height: 300px;
  overflow-y: auto;
}
.invitee-group-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: .55rem .8rem .3rem;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
}
.invitee-option {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .8rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: .85rem;
}
.invitee-option:last-child { border-bottom: none; }
.invitee-option:hover { background: var(--bg-inset); }
.invitee-option input { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.invitee-option .i-name { flex: 1; min-width: 0; }
.invitee-option .i-email { font-size: .74rem; color: var(--ink-faint); }
.invitee-count { font-size: .78rem; color: var(--ink-muted); margin-top: .5rem; }

/* A webinar with no join link cannot actually be joined. */
.missing-zoom { color: var(--garnet); font-weight: 600; }

/* Platform picker (webinar setup): two cards rather than a bare radio pair,
   because the choice changes which fields below are asked for. */
.platform-choice { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.platform-choice label {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .75rem .85rem;
  cursor: pointer;
}
.platform-choice label:hover { border-color: var(--border-strong); }
.platform-choice label.active { border-color: var(--accent); background: var(--accent-soft); }
.platform-choice input { margin-right: .45rem; }
.platform-choice .pc-name { font-size: .88rem; font-weight: 600; }
.platform-choice .pc-note {
  display: block; margin-top: .25rem;
  font-size: .75rem; line-height: 1.4; color: var(--ink-muted);
}
@media (max-width: 560px) { .platform-choice { grid-template-columns: 1fr; } }

/* Agenda builder */
.agenda-add { display: flex; gap: .5rem; margin-bottom: .8rem; }
.agenda-add .input { flex: 1; }
.agenda-add .input.mins { width: 92px; flex: 0 0 92px; }
.btn-add {
  background: var(--accent-soft);
  color: var(--accent-ink);
  /* A tinted button on a white card needs an edge, or it reads as disabled. */
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  padding: 0 .9rem;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-add:hover { filter: brightness(.97); }

.agenda-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem .1rem;
  border-bottom: 1px solid var(--border);
}
.agenda-item:last-child { border-bottom: none; }
.agenda-num {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--ink-faint);
  width: 1.4rem;
  flex-shrink: 0;
}
.agenda-text { flex: 1; min-width: 0; font-size: .85rem; }
.agenda-mins { font-size: .74rem; color: var(--ink-faint); white-space: nowrap; }
.agenda-remove {
  background: none;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: .2rem;
  line-height: 0;
  border-radius: var(--radius-sm);
}
.agenda-remove:hover { color: var(--garnet); background: var(--garnet-soft); }
.agenda-remove svg { width: 15px; height: 15px; }
.agenda-move {
  background: none; border: none; color: var(--ink-faint); cursor: pointer;
  padding: .1rem; line-height: 0; border-radius: var(--radius-sm);
}
.agenda-move:hover:not(:disabled) { color: var(--accent); background: var(--accent-soft); }
.agenda-move:disabled { opacity: .3; cursor: default; }
.agenda-move svg { width: 13px; height: 13px; }

/* Footer actions */
.form-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.btn-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .65rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-submit:hover:not(:disabled) { filter: brightness(1.05); }
.btn-submit:disabled { opacity: .6; cursor: default; }
.btn-cancel {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--ink);
  padding: .65rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}
.btn-cancel:hover { border-color: var(--ink-faint); }

/* Destructive actions. Deliberately not the accent colour — deleting a person
   should not look like the same kind of act as saving a form. */
.btn-danger {
  background: var(--garnet);
  border: none;
  color: #fff;
  padding: .65rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
.btn-danger:disabled { opacity: .6; cursor: default; }
.link-btn.danger { color: var(--garnet); }

/* What a deletion would detach, itemised. */
.impact-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.impact-row {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  padding: .55rem .9rem;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
}
.impact-row:last-child { border-bottom: none; }
.impact-n { font-weight: 700; min-width: 2.5rem; }
.impact-note { margin-left: auto; font-size: .76rem; color: var(--ink-muted); }

.alert {
  border-radius: var(--radius-md);
  padding: .8rem 1rem;
  font-size: .85rem;
  margin-bottom: 1.1rem;
  border: 1px solid transparent;
}
.alert-error { background: var(--garnet-soft); color: var(--garnet); border-color: rgba(155,60,60,.3); }
.alert-info { background: var(--bg-inset); color: var(--ink-muted); border-color: var(--border); }

/* Notify toggle */
.notify-toggle {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.notify-toggle input { accent-color: var(--accent); margin-top: .15rem; flex-shrink: 0; width: 15px; height: 15px; }
.notify-toggle .n-title { display: block; font-size: .85rem; font-weight: 600; }
.notify-toggle .n-sub { display: block; font-size: .74rem; color: var(--ink-muted); margin-top: .1rem; }

/* Invite send progress */
.progress-track {
  height: 8px;
  border-radius: 99px;
  background: var(--bg-inset);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 99px;
  transition: width .3s ease;
}
@media (prefers-reduced-motion: reduce) { .progress-fill { transition: none; } }
.progress-label { font-size: .84rem; color: var(--ink-muted); margin-top: .6rem; }

/* Committee cards */
.next-meeting {
  margin-top: .9rem;
  padding: .7rem .8rem;
  background: var(--bg-inset);
  border-radius: var(--radius-md);
}
.committee-actions {
  display: flex;
  gap: .9rem;
  margin-top: .9rem;
  padding-top: .8rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.committee-actions .link-btn { text-decoration: none; }

/* Filter tabs (meetings, action points) */
.filter-tabs {
  display: flex;
  gap: .3rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}
.filter-tab {
  background: none;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .4rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
}
.filter-tab:hover { border-color: var(--border-strong); }
.filter-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-tab .count {
  font-variant-numeric: tabular-nums;
  opacity: .7;
  margin-left: .3rem;
}

.meeting-buttons { display: flex; gap: .5rem; flex-shrink: 0; }

/* User rows (admin console) */
.user-row {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.user-row:last-child { border-bottom: none; }
.user-row.is-locked { opacity: .68; }
.user-row .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .8rem; font-weight: 600; flex-shrink: 0; border: none; margin: 0;
}
/* A whole row can be the link into a detail page (companies). */
a.user-row { text-decoration: none; color: inherit; }
a.user-row:hover { background: var(--surface-hover, rgba(0, 0, 0, .025)); }

.user-main { flex: 1; min-width: 0; }
.user-name {
  font-size: .9rem; font-weight: 600;
  display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
}
.user-meta { font-size: .77rem; color: var(--ink-muted); margin-top: .2rem; }
.user-actions { display: flex; gap: .8rem; flex-shrink: 0; }

/* Status chips. Also defined in home.css and meeting-room.css; repeated here
   because the admin console loads neither of those. */
.due-chip {
  font-size: .68rem;
  font-weight: 600;
  padding: .14rem .55rem;
  border-radius: 99px;
  letter-spacing: .02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.due-chip.overdue { background: var(--garnet-soft); color: var(--garnet); }
.due-chip.upcoming { background: var(--bg-inset); color: var(--ink-muted); }

/* Image upload with a preview of what is currently stored. */
.image-picker { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.image-preview {
  width: 140px; height: 84px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.image-preview.portrait { width: 84px; height: 84px; }
.image-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.image-preview.portrait img { width: 100%; height: 100%; object-fit: cover; }
.image-preview.empty { font-size: .74rem; color: var(--ink-faint); }
.image-controls { display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; }

/* A styled label standing in for the browser's own file button. */
.file-btn { position: relative; overflow: hidden; cursor: pointer; display: inline-block; }
.file-btn input[type="file"] {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer;
}

/* Labelled rule that splits one form into sections. */
.section-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.4rem 0 1rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.temp-password {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  letter-spacing: .06em;
  padding: .8rem 1rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--accent-ink);
  text-align: center;
  user-select: all;
}

/* Action point rows */
.ap-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .95rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.ap-row:last-child { border-bottom: none; }
.ap-row.is-closed .ap-summary { color: var(--ink-faint); }
.ap-main { flex: 1; min-width: 0; }
.ap-summary { font-size: .9rem; font-weight: 500; line-height: 1.4; }
.ap-meta {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-size: .76rem; color: var(--ink-muted); margin-top: .25rem;
}
.ap-progress {
  margin-top: .5rem; padding: .5rem .7rem;
  background: var(--bg-inset); border-radius: var(--radius-sm);
  font-size: .82rem; color: var(--ink-muted);
}
.ap-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; flex-shrink: 0;
}
.ap-actions { display: flex; gap: .6rem; }

/* Upload drop zone */
.upload-drop { cursor: pointer; transition: border-color .15s, background .15s; }
.upload-drop:hover { border-color: var(--accent); }
.upload-drop.is-dragging { border-color: var(--accent); background: var(--accent-soft); }
