:root,
[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f6f9;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --text: #1a2332;
  --text-muted: #5c6b7a;
  --border: #dde3ea;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --shadow: 0 4px 20px rgba(26, 35, 50, 0.08);
  --timer-bg: #0f172a;
  --timer-text: #f8fafc;
  --timer-over: #ef4444;
}

[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0f1419;
  --bg-card: #1a2332;
  --bg-input: #243044;
  --text: #e8edf4;
  --text-muted: #94a3b8;
  --border: #2d3a4d;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --timer-bg: #000000;
  --timer-text: #f8fafc;
  --timer-over: #f87171;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  /*line-height: 1.5;*/
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(1200px, 100% - 2rem);
  margin: 0 auto;
}

main {
  flex: 1;
}

/* Header */
.app-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  color: var(--text);
}

.logo-img {
  height: 3rem;
  width: auto;
  display: block;
}

.logo-img--dark {
  display: none;
}

[data-theme='dark'] .logo-img--light {
  display: none;
}

[data-theme='dark'] .logo-img--dark {
  display: block;
}

.auth-logo {
  display: flex;
  justify-content: center;
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-name {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.875rem;
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 1.1rem;
}

.btn-block {
  width: 100%;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.section {
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.section-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.form-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.app-footer {
  margin-top: auto;
  text-align: center;
  padding: 1rem 0 1.25rem;
}

.app-footer a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Auth page */
.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  width: min(420px, 100%);
}

.auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-form.hidden {
  display: none;
}

.auth-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.auth-footer-link {
  text-align: center;
  margin: 0.75rem 0 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}

.form-success {
  color: var(--success);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Meeting cards grid */
.meetings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.meeting-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.meeting-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-scheduled {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
}

.badge-in_progress {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.badge-completed {
  background: rgba(92, 107, 122, 0.15);
  color: var(--text-muted);
}

.meeting-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

/* Current meeting highlight */
.current-meeting-card {
  border-color: var(--success);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(22, 163, 74, 0.05) 100%);
}

/* Meeting conduct layout */
.meeting-layout {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 1rem;
  align-items: start;
}

.meeting-sidebar,
.meeting-main,
.meeting-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timer-display {
  background: var(--timer-bg);
  color: var(--timer-text);
  border-radius: 16px;
  padding: 2rem 1rem;
  text-align: center;
}

.timer-value {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  line-height: 1;
}

.timer-value.overtime {
  color: var(--timer-over);
}

.timer-label {
  margin-top: 0.5rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.timer-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Agenda list */
.agenda-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.agenda-item {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.agenda-item:hover {
  border-color: var(--primary);
}

.agenda-item.active {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.04);
}

.agenda-item.active .agenda-item-time {
  color: var(--primary);
  font-weight: 600;
}

.agenda-item.timer-running {
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(22, 163, 74, 0.06);
}

.agenda-item.timer-running .agenda-item-time {
  color: var(--success);
  font-weight: 600;
}

[data-theme='dark'] .agenda-item.timer-running {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.1);
}

[data-theme='dark'] .agenda-item.active {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
}

.agenda-item.completed {
  opacity: 0.7;
}

.agenda-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.agenda-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.agenda-item-name {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.agenda-item-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  flex-shrink: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  display: block;
}

.status-pending { background: var(--text-muted); }
.status-active { background: var(--success); }
.status-paused { background: var(--warning); }
.status-completed { background: var(--primary); }

/* Tasks */
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.task-item:last-child {
  border-bottom: none;
}

.task-item input[type='checkbox'] {
  margin-top: 0.25rem;
}

.task-done {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Participants */
.participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

/* Dynamic lists in forms */
.dynamic-list-item {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: end;
}

.agenda-form-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.agenda-form-row {
  grid-template-columns: minmax(0, 1fr) 6.5rem;
  align-items: end;
}

.agenda-form-row .agenda-title-field {
  min-width: 0;
}

.agenda-form-row .agenda-minutes-field .form-control {
  width: 100%;
  min-width: 0;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
}

.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 50;
  display: none;
}

.page-title {
  margin: 1.5rem 0;
  font-size: 1.5rem;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.toast.error {
  border-color: var(--danger);
  color: var(--danger);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .meeting-layout {
    grid-template-columns: 1fr 1fr;
  }

  .meeting-aside {
    grid-column: 1 / -1;
  }
}

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

  .header-inner {
    flex-wrap: wrap;
  }

  .user-name {
    display: none;
  }

  .fab {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .dynamic-list-item {
    grid-template-columns: 1fr;
  }

  .meetings-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .desktop-create-btn {
    display: inline-flex;
  }
}

.theme-toggle {
  color: var(--text-muted);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--primary);
}

.meeting-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.meeting-card-deletable .meeting-delete-btn {
  opacity: 0;
  transition: opacity 0.15s;
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.25rem;
}

.meeting-card-deletable:hover .meeting-delete-btn {
  opacity: 1;
}

.show-more-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.dynamic-list-item.participant-row {
  grid-template-columns: 1fr 1fr auto;
}

.clock-picker {
  position: relative;
}

.clock-display-btn {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.clock-dropdown {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  min-width: 260px;
}

.clock-mode {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.clock-mode-btn {
  flex: 1;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
}

.clock-mode-btn.active {
  border-color: var(--primary);
  color: var(--primary);
}

.clock-face {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
}

.clock-center-time {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  font-size: 1.1rem;
}

.clock-num {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
}

.clock-num-sm {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.7rem;
}

.clock-num.selected {
  background: var(--primary);
  color: #fff;
}

.participants-card {
  overflow: hidden;
}

.participant-item {
  align-items: flex-start;
  min-width: 0;
}

.participant-info {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.participant-info strong,
.participant-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-status {
  flex-shrink: 0;
  width: auto;
  min-width: 9.5rem;
  max-width: 42%;
  font-size: 0.8rem;
  padding-left: 0.4rem;
  padding-right: 1.5rem;
}

.participant-badge {
  flex-shrink: 0;
  white-space: nowrap;
}

.meeting-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meeting-elapsed {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.summary-panel {
  margin-bottom: 1rem;
}

.summary-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.summary-block p {
  margin: 0.25rem 0 0.75rem;
  color: var(--text-muted);
}

.agenda-add-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  list-style: none;
  padding: 0;
}

.notes-toolbar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.notes-card .rich-editor {
  min-height: 120px;
  max-height: min(50vh, calc(100vh - 280px));
  overflow-y: auto;
}

.rich-editor {
  min-height: 120px;
  overflow-y: auto;
}

.rich-editor:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.rich-editor ul,
.rich-editor ol {
  margin: 0.25rem 0;
  padding-left: 1.25rem;
}

.agenda-add-block {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  list-style: none;
  margin-top: 0.5rem;
  padding: 0;
}

.agenda-add-input {
  flex: 1;
  min-height: 2.5rem;
  resize: none;
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 25, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: min(100%, 420px);
  padding: 1.25rem;
}

.summary-dialog {
  width: min(92vw, 720px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-header .modal-title {
  margin: 0;
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.summary-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

.support-dialog {
  width: min(100%, 480px);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.support-modal-body {
  padding: 1.25rem;
}

.support-modal-body .form-group:last-of-type {
  margin-bottom: 0;
}

.support-user-email {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.support-modal-actions {
  padding: 0 1.25rem 1.25rem;
  margin-top: 0;
}

.summary-section-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.summary-item-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.summary-section {
  margin-bottom: 1.25rem;
}

.modal-message {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

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

.dropdown-wrap {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 30;
  display: flex;
  flex-direction: column;
  padding: 0.25rem;
}

.dropdown-menu button {
  border: none;
  background: none;
  text-align: left;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: var(--text);
  border-radius: 6px;
}

.dropdown-menu button:hover {
  background: var(--bg);
}

.current-meeting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem 1.5rem;
  align-items: start;
}

.current-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.current-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.current-value {
  font-size: 0.95rem;
  word-break: break-word;
}

.current-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.section-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-date-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 10rem;
}

.filter-date-label {
  display: none;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.filter-date {
  width: auto;
  min-width: 10rem;
}

.filter-search {
  width: auto;
  min-width: 12rem;
  flex: 1;
}

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

.list-add-btn {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.meeting-card-desc {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.current-cell-title .meeting-card-desc {
  margin-top: 0.25rem;
}

.active-agenda-responsible {
  margin-bottom: 0.75rem;
}

.active-agenda-responsible label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.reports-page {
  padding-bottom: 2rem;
}

.reports-filters {
  margin-bottom: 1.5rem;
}

.reports-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.reports-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.reports-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.reports-stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.reports-stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.reports-stat-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.new-task-heading {
  margin: 1rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.new-task-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.task-form-row-desc {
  display: block;
}

.task-form-row-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto) auto;
  align-items: end;
  gap: 0.5rem;
}

.task-info {
  flex: 1;
  min-width: 0;
}

.task-delete-btn {
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
}

.task-edit-btn {
  flex-shrink: 0;
  padding: 0.25rem;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  line-height: 0;
}

.task-edit-btn:hover {
  color: var(--text);
  background: var(--border);
}

.task-edit-dialog {
  max-width: 420px;
  width: 100%;
}

.task-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.task-form-row-meta {
  align-items: flex-end;
}

.meeting-header {
  flex-wrap: wrap;
  gap: 1rem;
}

.meeting-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.form-row-meeting {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.form-row-meeting .form-group {
  min-width: 0;
}

.form-row-meeting input[type='date'].form-control {
  min-width: 0;
  max-width: 100%;
}

.form-page .card {
  min-width: 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  .container {
    width: min(1200px, 100% - 1rem);
  }

  .section-header,
  .meeting-header,
  .section-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .section-filters {
    width: 100%;
  }

  .filter-date-wrap {
    width: 100%;
    min-width: 0;
  }

  .filter-date-label {
    display: block;
  }

  .filter-date,
  .filter-search {
    width: 100%;
    min-width: 0;
  }

  .current-meeting-grid {
    grid-template-columns: 1fr 1fr;
  }

  .current-actions {
    grid-column: 1 / -1;
  }

  .participant-item {
    flex-wrap: wrap;
  }

  .participant-status {
    max-width: 100%;
    width: 100%;
    margin-top: 0.35rem;
  }

  .agenda-add-block {
    flex-wrap: wrap;
  }

  .agenda-add-block input[type='number'] {
    width: 5rem;
  }

  .task-form-row-meta {
    grid-template-columns: 1fr;
  }

  .active-agenda-header {
    grid-template-columns: 1fr;
  }

  .active-agenda-planned {
    width: 100%;
  }

  .agenda-form-row {
    grid-template-columns: 1fr;
  }

  .form-row-meeting {
    grid-template-columns: 1fr;
  }

  .timer-value {
    font-size: 2.5rem;
  }

  .clock-dropdown {
    left: auto;
    right: 0;
  }
}

@media (max-width: 480px) {
  .current-meeting-grid {
    grid-template-columns: 1fr;
  }
}

/* Final layout refinements */
.dashboard-toolbar {
  margin-top: 1.5rem;
}

.meetings-grid,
.meetings-grid-more {
  gap: 1rem;
}

.meetings-grid-more {
  margin-top: 1rem;
}

.desktop-create-btn {
  display: none;
}

.meeting-page {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.meeting-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.meeting-title-block {
  min-width: 0;
}

.meeting-title-row {
  margin: 0;
}

.meeting-meta-line {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.agenda-item {
  background: rgba(92, 107, 122, 0.035);
}

.agenda-item:hover {
  border-color: rgba(92, 107, 122, 0.45);
}

.agenda-item.active {
  border-color: rgba(92, 107, 122, 0.45);
  background: rgba(92, 107, 122, 0.08);
}

[data-theme='dark'] .agenda-item.active {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(148, 163, 184, 0.08);
}

.status-active,
.status-completed {
  background: var(--text-muted);
}

.agenda-item-editor {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1;
}

.agenda-title-input {
  min-width: 0;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  padding: 0.15rem 0;
}

.agenda-title-input:focus,
.agenda-minutes-input:focus {
  outline: none;
  box-shadow: none;
}

.agenda-item-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.agenda-minutes-input {
  width: 3.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text);
  padding: 0.25rem 0.35rem;
  font-size: 0.8rem;
}

.agenda-add-block {
  margin-top: 0.75rem;
}

.participant-info {
  overflow: visible;
}

.participant-info strong,
.participant-email {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  overflow-wrap: anywhere;
}

.task-item {
  align-items: center;
}

.task-item-editable {
  align-items: flex-start;
}

.task-edit-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.task-edit-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 0.35rem;
  align-items: center;
}

.task-edit-meta input[type='date'] {
  min-width: 0;
  max-width: 100%;
}

.participant-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.add-participant-block .form-control {
  font-size: 0.875rem;
  padding: 0.45rem 0.6rem;
}

.new-task-form .form-group {
  margin: 0;
}

.task-field-submit {
  display: flex;
  align-items: stretch;
}

.task-field-submit .btn {
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}

.active-agenda-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.5rem;
}

.active-agenda-title-input {
  font-size: 1.25rem;
  font-weight: 600;
}

.active-agenda-planned {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 6.5rem;
  flex-shrink: 0;
}

.active-agenda-planned label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.active-agenda-planned .form-control {
  width: 100%;
  min-width: 0;
}

.dynamic-list-item.participant-row {
  align-items: center;
}

.dynamic-list-item.participant-row .remove-btn,
.agenda-form-item .remove-btn {
  align-self: center;
}

@media (min-width: 769px) {
  .desktop-create-btn {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .dashboard-toolbar {
    margin-top: 1rem;
  }

  .desktop-create-btn {
    display: none !important;
  }

  .meeting-topline {
    flex-direction: column;
    align-items: stretch;
  }

  .meeting-header-actions {
    justify-content: flex-start;
  }

  .agenda-item-header {
    align-items: center;
  }

  .agenda-item-controls {
    flex-direction: column;
    align-items: flex-end;
  }

  .task-form-row-meta {
    grid-template-columns: 1fr;
  }

  .active-agenda-header {
    grid-template-columns: 1fr;
  }

  .active-agenda-planned {
    width: 100%;
  }

  .agenda-form-row {
    grid-template-columns: 1fr;
  }

  .dynamic-list-item.participant-row {
    grid-template-columns: 1fr;
  }

  .task-edit-meta {
    grid-template-columns: 1fr;
  }

  .participant-add-form {
    grid-template-columns: 1fr;
  }
}
