﻿.form-row {
  margin-bottom: 12px;
}

.form-row-top {
  margin-top: 10px;
}

.form-row-top-lg {
  margin-top: 14px;
}

.inline-check {
  width: auto;
}

.stack-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form {
  display: inline;
}

.header-logout-button {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.header-logout-button:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #0f172a;
  transform: translateY(-1px);
}

.header-logout-button:focus-visible {
  outline: 3px solid rgba(147, 197, 253, 0.6);
  outline-offset: 2px;
}

.dashboard-welcome-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-color: #d7e3f4;
  background:
    radial-gradient(circle at top right, rgba(15, 92, 192, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

.dashboard-welcome-copy {
  flex: 1 1 auto;
}

.dashboard-welcome-copy h2 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.dashboard-welcome-copy .help {
  max-width: 980px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #cfe0fb;
  border-radius: 14px;
  background: linear-gradient(180deg, #f4f8ff 0%, #edf4ff 100%);
  color: #173153;
}

.dashboard-welcome-actions {
  display: grid;
  grid-template-columns: 210px;
  align-items: stretch;
  gap: 10px;
  justify-content: flex-end;
}

.dashboard-welcome-actions .inline-form {
  display: flex;
  width: 210px;
}

.dashboard-welcome-status {
  margin-top: 12px;
}

.dashboard-welcome-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d8e0ea;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-welcome-pill.is-on {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.dashboard-welcome-pill.is-off {
  background: #eef2f7;
  border-color: #d8e0ea;
  color: #475569;
}

.dashboard-voice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 210px;
  min-height: 44px;
  text-align: center;
  white-space: nowrap;
}

.dashboard-voice-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 210px;
  min-height: 44px;
  text-align: center;
  white-space: nowrap;
}

.dashboard-kpi-grid {
  margin-top: 4px;
}

.dashboard-kpi-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  border-color: #d9e5f6;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.dashboard-kpi-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #0f5cc0 0%, #6da2f3 100%);
}

.dashboard-kpi-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-kpi-value {
  margin-top: 10px;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.dashboard-summary-card,
.dashboard-filter-card,
.dashboard-table-card {
  border-color: #d9e5f6;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.dashboard-section-title {
  margin: 0 0 16px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.dashboard-filter-card {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.dashboard-filter-topbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.dashboard-quick-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1 1 520px;
}

.dashboard-quick-filter {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #c8d9f2;
  border-radius: 10px;
  background: #f8fbff;
  color: #173153;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.dashboard-quick-filter:hover {
  background: #eaf2ff;
  border-color: #9fc1ee;
  text-decoration: none;
  transform: translateY(-1px);
}

.dashboard-quick-filter.is-active {
  background: #0f5cc0;
  border-color: #0f5cc0;
  color: #fff;
}

.dashboard-filter-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 196px;
  padding: 12px 14px;
  border: 1px solid #cfe0fb;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.dashboard-filter-stat-label {
  color: #4b5e77;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-filter-stat-value {
  margin-top: 6px;
  color: #173153;
  font-size: 28px;
  line-height: 1;
}

.dashboard-filter-stat-note {
  margin-top: 6px;
  color: #61748d;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-filter-card .filter-grid {
  gap: 14px 10px;
}

.dashboard-filter-card .filter-grid .wide {
  grid-column: span 3;
}

.dashboard-filter-card input,
.dashboard-filter-card select {
  border-color: #c7d7ee;
  background: #fcfdff;
}

.dashboard-filter-card label {
  color: #4b5e77;
}

.dashboard-filter-card .filter-toggle-box {
  display: flex;
  align-items: flex-end;
}

.dashboard-filter-card .filter-toggle-box label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  padding: 0 2px;
  font-weight: 700;
}

.dashboard-filter-card .dashboard-filter-actions {
  justify-content: flex-start;
}

.dashboard-clear-button {
  cursor: pointer;
}

.dashboard-table-card {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.dashboard-table-wrap {
  border: 1px solid #e2eaf6;
  border-radius: 16px;
  background: #fff;
}

.dashboard-table {
  table-layout: auto;
}

.dashboard-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f9fe;
  color: #4b5e77;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-table tbody tr {
  transition: background 0.16s ease, transform 0.16s ease;
}

.dashboard-table tbody tr:hover {
  background: #f8fbff;
}

.dashboard-table tbody tr.is-recent-assignment {
  background: #f8fbff;
}

.dashboard-expand-row {
  cursor: pointer;
}

.dashboard-expand-row.is-open {
  background: #f4f8ff;
}

.dashboard-expand-detail-row > td {
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-expand-panel {
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
}

.dashboard-review-note {
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid #d7e3f4;
  border-radius: 12px;
  background: #ffffff;
  color: #173153;
  line-height: 1.45;
}

.dashboard-review-note-inline {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f4f8ff;
  color: #173153;
  font-size: 12px;
  line-height: 1.4;
}

.dashboard-expand-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.dashboard-inner-table-wrap {
  border: 1px solid #d9e5f6;
  border-radius: 14px;
  background: #fff;
}

.dashboard-inner-table {
  table-layout: auto;
}

.dashboard-inner-table th {
  background: #f7faff;
  font-size: 12px;
}

.dashboard-table tbody td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.dashboard-table td.dashboard-status-cell {
  text-align: center;
  vertical-align: middle;
}

.dashboard-status-cell,
.dashboard-owner-cell,
.dashboard-last-assigned-cell,
.dashboard-pending-cell,
.dashboard-files-cell,
.dashboard-action-cell {
  text-align: center;
}

.dashboard-status-cell .badge,
.dashboard-last-assigned-cell .badge,
.dashboard-last-assigned-cell .dashboard-fresh-badge {
  margin-inline: auto;
}

.dashboard-status-cell .badge {
  min-width: 82px;
}

.dashboard-table td.dashboard-owner-cell,
.dashboard-table td.dashboard-last-assigned-cell,
.dashboard-table td.dashboard-pending-cell {
  text-align: center;
  vertical-align: middle;
  white-space: normal;
}

.dashboard-owner-cell .muted,
.dashboard-last-assigned-cell .muted,
.dashboard-pending-cell .muted {
  display: inline-block;
  text-align: center;
}

.dashboard-owner-value,
.dashboard-last-assigned-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  text-align: center;
}

.dashboard-last-assigned-cell {
  min-width: 150px;
}

.dashboard-last-assigned-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dashboard-last-assigned-stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 92px;
  padding: 7px 10px;
  border: 1px solid #d9e5f6;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.dashboard-last-assigned-day {
  color: #173153;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.dashboard-last-assigned-time {
  color: #4b5e77;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.dashboard-fresh-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.dashboard-last-assigned-user {
  margin-top: 6px;
  text-align: center;
  line-height: 1.25;
}

.dashboard-pending-cell .pending-list {
  align-items: center;
  justify-content: center;
}

.dashboard-pending-cell .pending-item {
  width: 100%;
  text-align: center;
}

.dashboard-pending-cell .muted {
  display: inline-block;
  max-width: 120px;
  line-height: 1.3;
}

.dashboard-files-cell {
  white-space: nowrap;
}

.dashboard-files-cell a {
  font-weight: 700;
}

.dashboard-action-cell .table-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.dashboard-action-cell .table-actions form {
  margin: 0;
}

.dashboard-action-cell .table-actions button {
  min-width: 96px;
}

.dashboard-action-cell .muted.small {
  max-width: 120px;
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 1100px) {
  .dashboard-filter-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-filter-stat {
    min-width: 0;
  }

  .dashboard-filter-card .filter-grid .wide,
  .dashboard-filter-card .filter-toggle-box,
  .dashboard-filter-card .dashboard-filter-actions {
    grid-column: span 12;
  }
}

.dashboard-table-card .muted {
  color: #61748d;
}

.export-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

.export-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid #c8d9f2;
  border-radius: 10px;
  background: #f8fbff;
  color: #173153;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.export-link:hover {
  background: #eaf2ff;
  border-color: #9fc1ee;
  text-decoration: none;
  transform: translateY(-1px);
}

.export-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #0f5cc0;
  color: #fff;
  flex: 0 0 auto;
}

.export-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-heading {
  margin: 0;
}

.summary-content-spaced {
  margin-top: 14px;
}

.help-spaced {
  margin-top: 12px;
}

.help-spaced-lg {
  margin-top: 14px;
}

.textarea-field {
  width: 100%;
  min-height: 160px;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
}

.submit-lock-active button[type="submit"] {
  opacity: 0.7;
  cursor: wait;
}

.submit-lock-note {
  display: none;
  margin-top: 10px;
  color: #475569;
  font-size: 13px;
}

.submit-lock-active .submit-lock-note {
  display: block;
}

.profile-preference-card {
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #dce3ee;
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-preference-copy {
  flex: 1 1 320px;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch-ui {
  position: relative;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.toggle-switch-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-switch-ui {
  background: #0f5cc0;
}

.toggle-switch input:checked + .toggle-switch-ui::after {
  transform: translateX(24px);
}

.toggle-switch-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

@media (max-width: 800px) {
  .dashboard-welcome-card {
    flex-direction: column;
  }

  .dashboard-welcome-actions {
    width: 100%;
    grid-template-columns: 1fr;
    justify-content: flex-start;
  }

  .dashboard-welcome-actions .inline-form,
  .dashboard-voice-button,
  .dashboard-voice-toggle-button {
    width: 100%;
  }

  .profile-preference-card {
    align-items: flex-start;
  }
}
