/* ======================================================
   Home Captain · Interactive Prototype CSS
   Palette: exact pitch-deck jewel tones
   ====================================================== */

:root {
  --gold: #F2B233;
  --gold-dk: #c99020;
  --raspberry: #7A0C22;
  --raspberry-dk: #5a0818;
  --olive: #8B9A4A;
  --olive-dk: #6b7a38;
  --plum: #5C3A6E;
  --plum-dk: #442b50;
  --orange: #C04A1A;
  --orange-dk: #903815;
  --teal: #1A6B7A;
  --teal-dk: #14505a;
  --chart: #8B8C1A;
  --cream: #EDEBE3;
  --cream-dk: #d4d1c4;
  --cream-lt: #f5f3ec;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-2: #555;
  --text-3: #888;

  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;

  --sh-sm: 0 1px 4px rgba(0,0,0,0.07);
  --sh-md: 0 4px 14px rgba(0,0,0,0.09);
  --sh-lg: 0 8px 28px rgba(0,0,0,0.11);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 100px;

  --header-h: 68px;
}

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

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

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; }
input, select, textarea { font-family: inherit; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes blink { 0%,60%,100% { opacity:0.3; } 30% { opacity:1; } }
@keyframes slideIn { from { transform: translateX(100%); opacity:0; } to { transform: translateX(0); opacity:1; } }

/* ========================
   LAYOUT
   ======================== */

#proto-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--header-h);
}

.proto-main {
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 40px;
}

.proto-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

.proto-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.proto-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ========================
   HEADER
   ======================== */

.proto-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dk);
  height: var(--header-h);
}

.proto-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.proto-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.proto-logo-icon {
  width: 38px;
  height: 38px;
  background: var(--plum);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

.proto-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.proto-logo-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--plum);
}

.proto-logo-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  background: rgba(192,74,26,0.1);
  padding: 2px 6px;
  border-radius: var(--r-pill);
  width: fit-content;
}

/* Role Switcher */
.proto-role-switcher {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
}

.proto-role-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.proto-role-pill:hover {
  border-color: var(--role-color, #ccc);
  color: var(--role-color, #555);
  transform: translateY(-1px);
  box-shadow: var(--sh-sm);
}

.proto-role-pill.active {
  background: var(--role-color, #5C3A6E);
  border-color: var(--role-color, #5C3A6E);
  color: white;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--role-color, #5C3A6E) 35%, transparent);
}

.proto-role-pill.active[data-role="family"] { color: var(--text); }

.proto-role-icon { font-size: 1rem; }
.proto-role-label { }

/* Header Right */
.proto-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.proto-load-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}

.proto-load-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.proto-load-bar {
  width: 90px;
  height: 7px;
  background: var(--cream-dk);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.proto-load-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--olive), var(--gold), var(--raspberry));
  border-radius: var(--r-pill);
  transition: width 0.6s ease;
}

.proto-load-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--raspberry);
  min-width: 28px;
}

.proto-persona-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--white);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-sm);
}

.proto-persona-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.proto-persona-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

/* ========================
   ROLE BANNER
   ======================== */

.proto-role-banners {
  position: relative;
}

.proto-role-banner {
  display: none;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  border-left: 5px solid var(--role-color, #5C3A6E);
}

.proto-role-banner.active {
  display: block;
  animation: fadeUp 0.35s ease;
}

.proto-role-banner-inner {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.proto-role-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.proto-role-banner-text {
  flex: 1;
}

.proto-role-banner-greeting {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 2px;
}

.proto-role-banner-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 4px;
}

.proto-role-banner-desc {
  font-size: 0.85rem;
  color: var(--text-2);
}

.proto-role-banner-stats {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

.proto-role-stat {
  text-align: center;
}

.proto-role-stat-value {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
}

.proto-role-stat-label {
  font-size: 0.7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* ========================
   SHARED SECTION STYLES
   ======================== */

.proto-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.proto-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.proto-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.proto-section-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proto-section-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--plum);
  background: rgba(92,58,110,0.1);
  padding: 3px 8px;
  border-radius: var(--r-pill);
}

.proto-section-meta {
  font-size: 0.8rem;
  color: var(--text-3);
}

.proto-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Card */
.proto-card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.proto-card:hover { box-shadow: var(--sh-md); }

/* Buttons */
.proto-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  transition: all 0.2s;
  cursor: pointer;
}

.proto-btn-primary {
  background: var(--plum);
  color: white;
}

.proto-btn-primary:hover {
  background: var(--plum-dk);
  transform: translateY(-1px);
  box-shadow: var(--sh-md);
}

.proto-btn-ghost {
  background: var(--cream);
  color: var(--text-2);
}

.proto-btn-ghost:hover {
  background: var(--cream-dk);
}

/* ========================
   TASKS
   ======================== */

.proto-task-filter {
  display: flex;
  gap: 4px;
}

.proto-filter-pill {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--cream-dk);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.2s;
  cursor: pointer;
}

.proto-filter-pill.active,
.proto-filter-pill:hover {
  background: var(--plum);
  border-color: var(--plum);
  color: white;
}

.proto-task-list {
  display: flex;
  flex-direction: column;
}

.proto-task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cream);
  transition: background 0.15s;
  position: relative;
}

.proto-task-item:last-child { border-bottom: none; }
.proto-task-item:hover { background: var(--cream-lt); }

.proto-task-item.hidden { display: none; }
.proto-task-item.completed .proto-task-title { text-decoration: line-through; color: var(--text-3); }
.proto-task-item.completed { opacity: 0.6; }

.proto-task-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--cream-dk);
  background: white;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.proto-task-check:hover {
  border-color: var(--olive);
  background: rgba(139,154,74,0.1);
}

.proto-task-check.checked {
  background: var(--olive);
  border-color: var(--olive);
}

.proto-task-check.checked::after {
  content: '';
  position: absolute;
  top: 3px; left: 6px;
  width: 4px; height: 8px;
  border: 2px solid white;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}

.proto-task-urgency-bar {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  flex-shrink: 0;
  min-height: 40px;
}

.proto-task-urgency-bar.high   { background: var(--raspberry); }
.proto-task-urgency-bar.medium { background: var(--gold); }
.proto-task-urgency-bar.low    { background: var(--olive); }

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

.proto-task-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proto-task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.proto-task-tag {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 600;
}

.proto-task-assignee,
.proto-task-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-3);
}

.proto-task-notes {
  font-size: 0.78rem;
  color: var(--text-2);
  font-style: italic;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proto-task-visibility {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
}

.proto-task-role-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.proto-task-restricted {
  padding: 20px;
}

.proto-restricted-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--cream-lt);
  border-radius: var(--r-md);
  border: 1px dashed var(--cream-dk);
}

.proto-restricted-icon { font-size: 1.2rem; }

.proto-restricted-text {
  font-size: 0.82rem;
  color: var(--text-2);
}

/* ========================
   VAULT
   ======================== */

.proto-vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.proto-vault-card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s;
}

.proto-vault-card:hover { box-shadow: var(--sh-md); }

.proto-vault-card.revocation-pending {
  border: 2px solid var(--orange);
}

.proto-vault-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.proto-vault-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.proto-vault-icon-health    { background: rgba(122,12,34,0.1); }
.proto-vault-icon-school    { background: rgba(139,154,74,0.12); }
.proto-vault-icon-financial { background: rgba(92,58,110,0.1); }
.proto-vault-icon-contact   { background: rgba(26,107,122,0.1); }

.proto-vault-info { flex: 1; }

.proto-vault-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.proto-vault-type {
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.proto-vault-encryption {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  color: var(--olive);
  font-weight: 600;
}

.proto-vault-last-access {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-3);
}

.proto-vault-permissions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.proto-vault-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proto-vault-role-chip {
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 600;
}

/* Toggle switch */
.proto-vault-toggle-switch {
  width: 38px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--cream-dk);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.proto-vault-toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--sh-sm);
  transition: left 0.2s;
}

.proto-vault-toggle-switch.on {
  background: var(--olive);
}

.proto-vault-toggle-switch.on::after {
  left: 19px;
}

/* Revocation */
.proto-vault-revocation-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(192,74,26,0.08);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  color: var(--orange-dk);
  flex-wrap: wrap;
}

.proto-vault-cancel-revoke {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--orange);
  background: white;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--orange);
  cursor: pointer;
  transition: all 0.2s;
}

.proto-vault-cancel-revoke:hover {
  background: var(--orange);
  color: white;
}

.proto-vault-actions {
  display: flex;
  gap: 8px;
}

.proto-vault-action-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--r-md);
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.proto-vault-revoke-btn {
  background: rgba(122,12,34,0.08);
  color: var(--raspberry);
}

.proto-vault-revoke-btn:hover {
  background: var(--raspberry);
  color: white;
}

/* Privacy bar */
.proto-vault-privacy-bar {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.proto-vault-privacy-icon {
  width: 36px;
  height: 36px;
  background: var(--plum);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proto-vault-log-btn {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--plum);
  background: white;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--plum);
  cursor: pointer;
  transition: all 0.2s;
}

.proto-vault-log-btn:hover {
  background: var(--plum);
  color: white;
}

/* ========================
   CALENDAR
   ======================== */

.proto-cal-date-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
}

.proto-cal-nav {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--cream-dk);
  background: var(--white);
  font-size: 1rem;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.proto-cal-nav:hover {
  background: var(--plum);
  border-color: var(--plum);
  color: white;
}

.proto-calendar-card {
  overflow: hidden;
}

.proto-cal-header-row {
  display: flex;
  border-bottom: 1px solid var(--cream);
  padding: 10px 0 8px;
  position: sticky;
  top: var(--header-h);
  background: var(--white);
  z-index: 1;
}

.proto-cal-person-col {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

.proto-cal-timeline-header {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.proto-cal-hour-label {
  flex: 1;
  font-size: 0.68rem;
  color: var(--text-3);
  font-weight: 600;
  text-align: center;
}

.proto-cal-body {
  display: flex;
  flex-direction: column;
}

.proto-cal-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--cream-lt);
  min-height: 58px;
}

.proto-cal-row:last-child { border-bottom: none; }

.proto-cal-row.hidden { display: none; }

.proto-cal-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proto-cal-person-info {
  display: flex;
  flex-direction: column;
}

.proto-cal-person-name {
  font-weight: 600;
  font-size: 0.82rem;
}

.proto-cal-person-role {
  font-size: 0.7rem;
  color: var(--text-3);
}

.proto-cal-events-row {
  flex: 1;
  position: relative;
  height: 38px;
  margin: 10px 0;
}

.proto-cal-event {
  position: absolute;
  height: 34px;
  border-radius: var(--r-sm);
  padding: 4px 8px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s;
  min-width: 40px;
  opacity: 0.92;
}

.proto-cal-event:hover {
  opacity: 1;
  transform: scaleY(1.05);
  box-shadow: var(--sh-md);
  z-index: 2;
}

.proto-cal-event-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.proto-cal-event-time {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  line-height: 1.2;
}

.proto-cal-legend {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--cream);
  flex-wrap: wrap;
}

.proto-cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-2);
}

.proto-cal-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ========================
   AI ASSISTANT PANEL
   ======================== */

.proto-ai-panel {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - var(--header-h) - 48px);
}

.proto-ai-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--cream);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--plum) 0%, var(--teal) 100%);
}

.proto-ai-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proto-ai-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
}

.proto-ai-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
}

.proto-ai-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 2s infinite;
}

.proto-ai-suggestions {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cream);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proto-ai-suggestions-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  margin-bottom: 2px;
}

.proto-ai-suggestion-btn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: var(--cream-lt);
  border: 1.5px solid var(--cream-dk);
  border-radius: var(--r-md);
  font-size: 0.78rem;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.4;
}

.proto-ai-suggestion-btn:hover {
  background: rgba(92,58,110,0.08);
  border-color: var(--plum);
  color: var(--text);
}

.proto-ai-suggestion-icon {
  flex-shrink: 0;
  font-size: 0.9rem;
}

.proto-ai-suggestion-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proto-ai-chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 160px;
  max-height: 300px;
}

.proto-ai-msg { display: flex; flex-direction: column; }

.proto-ai-msg-content {
  padding: 12px 16px;
  background: var(--cream);
  border-radius: var(--r-lg);
  border-top-left-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.55;
  max-width: 92%;
  animation: fadeUp 0.3s ease;
}

.proto-ai-msg-user .proto-ai-msg-content {
  background: var(--plum);
  color: white;
  border-top-left-radius: var(--r-lg);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.proto-ai-msg-action {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  padding-left: 4px;
}

.proto-ai-action-chip {
  padding: 5px 12px;
  background: var(--plum);
  color: white;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.proto-ai-action-chip:hover {
  background: var(--plum-dk);
  transform: translateY(-1px);
}

.proto-ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
}

.proto-ai-typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--plum);
  animation: blink 1.4s infinite;
}

.proto-ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.proto-ai-typing span:nth-child(3) { animation-delay: 0.4s; }

.proto-ai-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--cream);
}

.proto-ai-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--cream-dk);
  border-radius: var(--r-md);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.proto-ai-input:focus { border-color: var(--plum); }

.proto-ai-send {
  width: 42px; height: 42px;
  background: var(--plum);
  color: white;
  border: none;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.proto-ai-send:hover {
  background: var(--plum-dk);
}

/* ========================
   TASK CREATION MODAL
   ======================== */

.proto-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.proto-modal-overlay.open {
  display: flex;
  animation: fadeUp 0.25s ease;
}

.proto-modal {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
}

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

.proto-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.proto-modal-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--cream);
  color: var(--text-2);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
  padding-bottom: 2px;
}

.proto-modal-close:hover { background: var(--cream-dk); }

.proto-task-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.proto-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proto-form-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.proto-form-input,
.proto-form-select,
.proto-form-textarea {
  padding: 10px 14px;
  border: 2px solid var(--cream-dk);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}

.proto-form-input:focus,
.proto-form-select:focus,
.proto-form-textarea:focus { border-color: var(--plum); }

.proto-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.proto-form-textarea {
  resize: vertical;
  min-height: 72px;
}

.proto-role-checkboxes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.proto-role-check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  cursor: pointer;
}

.proto-role-check input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--plum);
}

.proto-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* ========================
   TOAST
   ======================== */

.proto-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 600;
  padding: 12px 20px;
  background: var(--text);
  color: white;
  border-radius: var(--r-md);
  font-size: 0.88rem;
  box-shadow: var(--sh-lg);
  transform: translateX(110%);
  transition: transform 0.35s ease;
  max-width: 340px;
}

.proto-toast.show {
  transform: translateX(0);
}

/* ========================
   FOOTER
   ======================== */

.proto-footer {
  border-top: 1px solid var(--cream-dk);
  padding: 20px 40px;
  margin-top: 16px;
}

.proto-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-3);
}

.proto-footer-link {
  text-decoration: none;
  color: var(--plum);
  font-weight: 600;
  transition: opacity 0.2s;
}

.proto-footer-link:hover { opacity: 0.75; }

