/* desktop-v2 (light/futuristic redesign, design/desktop-v2-light) - built from
   the approved 4-artboard wireframe (Main, Login, Home-App, Confirm-App:
   https://claude.ai/code/artifact/f5b8d97b-ac1c-49d1-8e5c-75e1ff40fd82).

   Tokens below are copied verbatim from ../desktop/styles.css, not
   reinvented - same palette, radii, shadow, font. This file only adds new
   component shapes (topbar, mic hero, task/meeting cards, mascot,
   login page) and a mobile breakpoint that turns the desktop grid into the
   Home-App/Confirm-App phone layout in place, since the shipped app is one
   responsive page, not separate native builds (decisions/no-native-app.md,
   decisions/mvp-localhost-only.md). The voice banner/readback/edit rules
   below are copied unchanged from the real app - the confirm gate must look
   and behave identically here. */
:root {
  color-scheme: light;

  --color-bg: #efeafb;
  --color-surface: #ffffff;
  --color-surface-2: #faf9fe;

  --color-text: #17151f;
  --color-neutral-200: #3a3650;
  --color-neutral-300: #4e4a66;
  --color-neutral-400: #716c8a;
  --color-neutral-500: #8b87a0;
  --color-neutral-600: #a6a2ba;
  --color-neutral-800: #edebf6;
  --color-divider: #17151f14;

  --color-accent: #6c4cf1;
  --color-accent-100: #efe9fe;
  --color-accent-200: #b9a6fb;
  --color-accent-300: #8c6df6;
  --color-accent-600: #4e32c9;

  --color-teal: #17b3a3;
  --color-teal-100: #dff6f2;

  --color-danger: #d6483d;
  --color-danger-bg: #fbe4e2;
  --color-warning: #b98420;
  --color-warning-bg: #fbf0d9;

  --color-on-accent: #ffffff;

  --radius-sm: 10px;
  --radius-md: 22px;

  --shadow-card: 0 20px 45px -28px rgba(76, 58, 150, 0.35), 0 2px 10px rgba(76, 58, 150, 0.06);

  --font-body: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--color-text);
  background:
    radial-gradient(1100px 560px at 78% -8%, #f4e9ff 0%, transparent 60%),
    radial-gradient(900px 520px at 8% 6%, #ddeffb 0%, transparent 55%),
    linear-gradient(165deg, #f4f1fe 0%, #e9e1fc 42%, #e1eafb 78%, #e9f3f0 100%);
  background-attachment: fixed;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.field-box {
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-divider);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.field-label { font-size: 12px; font-weight: 700; color: var(--color-neutral-400); margin-bottom: 4px; }
.field-value { font-size: 14.5px; font-weight: 700; }

.kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
  color: var(--color-accent-600); background: var(--color-accent-100);
  padding: 6px 14px; border-radius: 999px;
}

/* --- topbar ---------------------------------------------------------------
   A card, not a bare nav strip - matches the wireframe's floating header. */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  margin: 24px 32px 0;
  padding: 0 28px;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.wordmark { font-size: 18px; font-weight: 800; }
.logo {
  width: 38px; height: 38px; flex: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c5cfb, #17b3a3);
  display: flex; align-items: center; justify-content: center;
}
.logo svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-date { font-size: 13.5px; font-weight: 600; color: var(--color-neutral-400); }
.avatar {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  background: var(--color-accent-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-accent-600);
}
.avatar svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* --- mode notices ------------------------------------------------------- */

.notices { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 32px 0; }
.notices p {
  margin: 0; padding: 9px 16px;
  font-size: 12.5px; font-weight: 600;
  color: var(--color-accent-600); background: var(--color-accent-100);
  border: 1.5px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
  border-radius: 999px;
}

/* --- mic hero --------------------------------------------------------------
   Centered, standalone - the wireframe's "prominent circular control" below
   the topbar, not paired with a headline card like the real desktop app. */

.mic-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 34px 32px 6px; }
.mic-hero .subtle { font-size: 14px; font-weight: 700; color: var(--color-neutral-300); }

.mic {
  width: 116px; height: 116px; flex: none;
  position: relative;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #7c5cfb, #5a3fe0);
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 20px 40px -14px rgba(108, 76, 241, 0.55);
  transition: transform 150ms;
}
.mic svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.mic:hover:not(:disabled) { transform: scale(1.03); }
.mic[data-state="recording"] { animation: micPulse .85s ease-in-out infinite; }
.mic[disabled] { opacity: .5; cursor: default; animation: none; }

@keyframes micPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 55%, transparent),
                0 0 14px 3px color-mix(in srgb, var(--color-accent) 45%, transparent);
  }
  50% {
    box-shadow: 0 0 0 13px color-mix(in srgb, var(--color-accent) 0%, transparent),
                0 0 26px 7px color-mix(in srgb, var(--color-accent) 55%, transparent);
  }
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 45%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--color-accent) 0%, transparent); }
}

/* --- voice banner (confirm gate) -------------------------------------------
   Copied unchanged from the real app - this is the one thing on the page
   that isn't allowed to look or behave differently between the two builds. */

.banner {
  display: flex; align-items: flex-start; gap: 18px;
  margin: 0 32px 28px;
  padding: 26px 32px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-size: 15px;
  animation: bannerIn 180ms cubic-bezier(.2,.7,.2,1);
}
@keyframes bannerIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.banner .dot { width: 10px; height: 10px; flex: none; margin-top: 8px; border-radius: 50%; background: var(--color-accent); animation: breathe 1.2s ease-out infinite; }
.banner .kicker { display: inline-block; }
.banner-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.banner-text { font-weight: 500; }
.banner-actions { display: flex; gap: 12px; align-self: flex-end; margin-top: 6px; }
.banner.error .banner-text { color: var(--color-danger); }

.readback { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; margin: 4px 0 0; }
.readback dt { font-size: 13px; font-weight: 600; color: var(--color-neutral-400); align-self: center; }
.readback dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; align-self: center; }
.readback .warn { color: var(--color-warning); }
.readback dt.warn::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--color-warning); margin-inline-end: 6px;
}

.voice-edit { display: flex; flex-wrap: wrap; gap: 14px 18px; margin-top: 6px; }
.voice-edit label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--color-neutral-400); }
.voice-edit label.wide { flex: 1 1 100%; }
.voice-edit input {
  font: inherit; font-size: 15px; padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-divider);
  background: var(--color-surface-2); color: var(--color-text);
}
.voice-edit input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.voice-edit input:disabled { opacity: .55; }
.voice-edit input::placeholder { color: var(--color-neutral-600); font-style: italic; }
.voice-edit label.low-confidence span { color: var(--color-warning); font-weight: 700; }
.voice-edit label.low-confidence input { border: 1.5px dashed var(--color-warning); background: var(--color-warning-bg); }
.edit-fields { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 14px 18px; }
.edit-fields label { flex: 1 1 220px; }
.edit-fields label.wide { flex: 1 1 100%; }
.edit-error { flex: 1 1 100%; margin: 0; font-size: 13px; color: var(--color-danger); }

/* Voice-to-text vs. comprehension time, once a command has resolved. */
.banner-timing { font-size: 12.5px; color: var(--color-neutral-400); }

/* A date field with a calendar-picker button beside the text box - typing
   still works, the button is a faster alternative, not a replacement. */
.edit-fields .field-with-picker { display: flex; gap: 6px; align-items: stretch; }
.edit-fields .field-with-picker input { flex: 1 1 auto; min-width: 0; }
.date-picker-toggle {
  flex: none; width: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-divider);
  background: var(--color-surface-2); color: var(--color-neutral-300);
  cursor: pointer;
}
.date-picker-toggle:hover { background: var(--color-neutral-800); color: var(--color-text); }
.date-picker-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* The calendar popup itself - anchored under whichever field opened it. */
.date-picker {
  position: absolute; z-index: 20;
  width: 280px; padding: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-divider);
}
.date-picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.date-picker-head span { font-size: 14px; font-weight: 700; }
.date-picker-nav {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 999px; background: var(--color-surface-2); color: var(--color-text); cursor: pointer;
}
.date-picker-nav:hover { background: var(--color-neutral-800); }
.date-picker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.date-picker-weekday { font-size: 11px; text-align: center; color: var(--color-neutral-500); padding-bottom: 4px; }
.date-picker-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 8px; background: transparent; color: var(--color-text);
  font: inherit; font-size: 13px; cursor: pointer;
}
.date-picker-day:hover { background: var(--color-accent-100); }
.date-picker-day.today { font-weight: 800; color: var(--color-accent); }
.date-picker-day.selected { background: var(--color-accent); color: var(--color-on-accent); }

.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn { font: inherit; font-size: 14.5px; padding: 12px 26px; border-radius: 14px; cursor: pointer; border: none; transition: transform 140ms ease-out, box-shadow 150ms, background-color 150ms, color 150ms; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(120deg, #7c5cfb, #5a3fe0);
  color: var(--color-on-accent); font-weight: 800;
  box-shadow: 0 16px 30px -12px rgba(108, 76, 241, 0.55);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 20px 34px -12px rgba(108, 76, 241, 0.65); }
.btn-ghost { background: var(--color-surface-2); color: var(--color-neutral-300); font-weight: 600; }
.btn-ghost:hover:not(:disabled) { background: var(--color-neutral-800); color: var(--color-text); }

/* --- layout ---------------------------------------------------------------
   Two columns: today's tasks (wide, right in RTL) beside today's meetings
   (narrower, left in RTL) - the only two report sections in scope, no
   calendar, no status bars, no other report card. */

.page { max-width: 1500px; margin: 0 auto; padding: 8px 32px 80px; }
.subtle { font-size: 13.5px; font-weight: 600; color: var(--color-neutral-400); margin: 0; }
.empty { font-size: 14px; color: var(--color-neutral-500); }
.empty.unreachable { color: var(--color-danger); font-weight: 500; }
.empty.unreachable::before { content: "⚠ "; }

.grid-main { display: grid; grid-template-columns: 1.7fr 1fr; gap: 24px; margin-top: 24px; }
.grid-main > section { min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-head span:first-child { font-size: 17px; font-weight: 800; }
.section-body { padding: 32px; }

@media (max-width: 900px) {
  .grid-main { grid-template-columns: 1fr; }
}

/* --- today's tasks -----------------------------------------------------------
   Same field-box/meeting-card component as ../desktop-v2's "today's
   meetings" panel below - two report sections, one visual language, since
   both are now flat lists rather than one being a donut grid. */

.task-list { display: flex; flex-direction: column; gap: 14px; }
.task-status { min-width: 96px; text-align: center; font-size: 12.5px; font-weight: 700; }
.dept-task-overdue { font-size: 11px; font-weight: 700; color: var(--color-danger); background: var(--color-danger-bg); padding: 3px 10px; border-radius: 999px; white-space: nowrap; align-self: flex-start; }

/* --- today's meetings ---------------------------------------------------- */

.meeting-list { display: flex; flex-direction: column; gap: 14px; }
.meeting-card { display: flex; gap: 14px; align-items: center; }
.meeting-time { width: 76px; flex-shrink: 0; text-align: center; font-variant-numeric: tabular-nums; }
.meeting-main { flex: 1; }
.meeting-title { font-weight: 800; margin-bottom: 2px; }
.meeting-with { font-size: 12px; font-weight: 600; color: var(--color-neutral-400); }
.meeting-empty {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 120px; padding: 16px;
  border-radius: var(--radius-sm); background: var(--color-surface-2);
  border: 1.5px dashed var(--color-divider);
  font-size: 13px; font-weight: 600; color: var(--color-neutral-500);
}

/* --- mascot -----------------------------------------------------------------
   The "happy animated robot" - a gradient circle with a friendly face,
   reused at full size on the login screen and mini in empty states. A
   gentle bob plus an occasional blink, both switched off under
   prefers-reduced-motion the same way the mic pulse already is. */

.mascot {
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cfb, #17b3a3);
  display: flex; align-items: center; justify-content: center;
  flex: none;
  animation: mascotBob 3.2s ease-in-out infinite;
}
.mascot svg { fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mascot-eye { animation: mascotBlink 4.6s ease-in-out infinite; transform-origin: center; }
@keyframes mascotBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes mascotBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.15); }
}

/* --- login page ------------------------------------------------------------
   Static stub - auth is deferred to release (decisions/mvp-localhost-only.md),
   so the buttons here link straight into the dashboard rather than posting
   anywhere. */

.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.login-card {
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; align-items: center; gap: 26px;
}
.login-card .mascot { width: 148px; height: 148px; box-shadow: var(--shadow-card); }
.login-card .mascot svg { width: 76px; height: 76px; }
.login-title { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.login-title h1 { font-size: 26px; font-weight: 800; margin: 0; }
.login-title p { font-size: 15px; color: var(--color-neutral-400); font-weight: 500; margin: 0; }
.login-actions { display: flex; flex-direction: column; gap: 14px; width: 100%; margin-top: 4px; }
.login-actions a, .login-actions button {
  font-family: var(--font-body); font-size: 15px; text-align: center; text-decoration: none;
  padding: 14px; border-radius: var(--radius-sm); cursor: pointer;
}
.login-primary { font-weight: 800; border: none; background: linear-gradient(120deg, #7c5cfb, #5a3fe0); color: #fff; box-shadow: 0 16px 30px -12px rgba(108, 76, 241, 0.55); display: block; }
.login-secondary { font-weight: 700; border: 1.5px solid var(--color-divider); background: var(--color-surface-2); color: var(--color-text); display: block; }
.login-terms { font-size: 12.5px; color: var(--color-neutral-500); margin-top: 6px; text-align: center; }

.status { color: var(--color-neutral-500); font-size: 13px; margin: 24px 32px 0; }
.status.error { color: var(--color-danger); }

/* --- mobile ("app") breakpoint ---------------------------------------------
   Below phone width the desktop grid collapses into the Home-App /
   Confirm-App artboards' single-column shape: smaller mic, tasks and
   meetings both stacked full-width. This is the "app" half of "desktop and
   app" - a responsive breakpoint of the same page, not a second native
   build (decisions/no-native-app.md). */
@media (max-width: 600px) {
  .topbar { margin: 16px 16px 0; padding: 0 18px; height: 64px; }
  .wordmark { font-size: 16px; }
  .notices { padding: 14px 16px 0; }
  .mic-hero { padding: 24px 16px 4px; }
  .mic { width: 96px; height: 96px; }
  .mic svg { width: 34px; height: 34px; }
  .banner { margin: 0 16px 20px; padding: 20px; }
  .page { padding: 8px 16px 56px; }
  .section-body { padding: 18px 16px; }
}

/* Same fix as ../desktop/styles.css, same threshold - the confirm gate must
   behave identically in both builds. Below ~640px, .banner-actions
   (انصراف/تأیید) doesn't shrink or wrap next to .banner-body - it was eating
   most of the row's width, and .banner-body's min-width: 0 let the readback
   grid's value column get squeezed toward 0px. Combined with .readback dd's
   overflow-wrap: anywhere, every character of a value wrapped onto its own
   line - text that technically rendered but was unreadable, easy to mistake
   for invisible. Stacking the row fixes it: the readback gets the full
   width, the buttons drop below it full-width, matching the confirm-gate's
   mobile wireframe (Confirm-App.dc.html). */
@media (max-width: 640px) {
  .banner { flex-direction: column; align-items: stretch; }
  .banner-actions { align-self: stretch; }
  .banner-actions .btn-ghost { flex: 1; }
  .banner-actions .btn-primary { flex: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .mic[data-state="recording"], .banner .dot, .mascot, .mascot-eye { animation: none; }
}
