/* ============================================================
   FORONDA COMMAND CENTER — Executive Dashboard v1.0
   Dashboard-specific styles composing Brand tokens + components
   2026-05-31
   ============================================================ */

/* ── CONTEXT TOGGLE ─────────────────────────────────────── */

.ctx-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
}

.ctx-toggle__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.3em 0.85em;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.ctx-toggle__btn--active {
  background: rgba(174, 255, 0, 0.12);
  color: var(--lime-neon);
  box-shadow: 0 0 8px rgba(174,255,0,0.18), inset 0 1px 0 rgba(174,255,0,0.12);
}

.ctx-toggle__btn--active-biz {
  background: rgba(99, 102, 241, 0.16);
  color: var(--indigo-bright);
  box-shadow: 0 0 8px var(--indigo-glow-soft), inset 0 1px 0 rgba(99,102,241,0.12);
}


/* ── DASHBOARD TOP BAR ──────────────────────────────────── */

.dash-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: rgba(7, 12, 24, 0.92);
  backdrop-filter: blur(var(--blur-lg));
  -webkit-backdrop-filter: blur(var(--blur-lg));
  border-bottom: var(--border-subtle);
  gap: var(--space-3);
  min-height: 112px;
}

.dash-topbar__center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.dash-topbar__center .fcc-logo {
  pointer-events: auto;
}

.dash-topbar__left,
.dash-topbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1 1 0;
}
.dash-topbar__right {
  justify-content: flex-end;
}


/* ── DASHBOARD LAYOUT ───────────────────────────────────── */

/*
  Responsive grid — 3 breakpoints:
  • Phone  (<768px):  single column, centered (unchanged behavior)
  • Tablet (768–1179px): 2 columns
  • Desktop (≥1180px):  3 columns, max ~1600px container

  Widget span assignments (desktop):
  • widget-1  (Daily Brief)    → span 3 (full-width — big atmospheric header)
  • widget-2  (Today Agenda)   → span 2 (prominent, list-heavy)
  • widget-3  (Needs You Now)  → span 2 on tablet; span 2 on desktop
  • widget-4  (Weather)        → span 1
  • widget-5  (My 3 Today)     → span 1
  • widget-6  (Reminders)      → span 1
  • widget-7  (Notes)          → span 1
  • widget-8  (Email Digest)   → span 2
  • widget-9  (Recent Docs)    → span 1
  • widget-10 (Quick Launch)   → span 2
  • widget-11 (System Strip)   → span 3 (always full-width footer bar)
*/

.dash-content {
  flex: 1;
  padding: var(--space-4);
  /* Phone: single column flex (preserves existing behavior exactly) */
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: var(--content-card);
  margin: 0 auto;
  width: 100%;
  padding-bottom: calc(var(--space-4) + 80px); /* nav clearance */
}

/* When the RGL board is active, suppress the flex-column layout of dash-content
   so WidthProvider gets a clean full-width block context. */
.dash-content.rgl-board {
  display: block !important;
  flex-direction: unset !important;
  gap: unset !important;
  max-width: 1640px;
}


/* ── SECTION HEADER ─────────────────────────────────────── */

.dash-section-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0 var(--space-2);
}

.dash-section-label__text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.dash-section-label__text--lime {
  color: var(--lime-neon);
  text-shadow: 0 0 8px rgba(174,255,0,0.3);
}

.dash-section-label__text--red {
  color: var(--red-text);
  text-shadow: 0 0 8px rgba(255,45,45,0.35);
}

.dash-section-label__count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 0.1em 0.5em;
  border-radius: var(--radius-full);
}

.dash-section-label__count--red {
  background: var(--red-surface);
  color: var(--red-text);
  border: 1px solid var(--red-border);
  animation: dot-pulse 1.5s ease-in-out infinite;
}

.dash-section-label__link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-decoration: none;
  margin-left: auto;
  transition: color var(--dur-fast) var(--ease-out);
}
.dash-section-label__link:hover {
  color: var(--text-secondary);
}


/* ── DAILY BRIEF ────────────────────────────────────────── */

.brief-card {
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg,
    rgba(174, 255, 0, 0.04) 0%,
    var(--bg-surface-1) 60%,
    var(--bg-surface-2) 100%
  );
  border: 1px solid rgba(174, 255, 0, 0.18);
  border-radius: var(--radius-lg);
  box-shadow:
    0 0 0 1px rgba(174,255,0,0.06),
    0 0 20px rgba(174,255,0,0.06),
    var(--shadow-md);
  position: relative;
  overflow: hidden;
  animation: fade-in-up var(--dur-slow) var(--ease-out) both;
}

.brief-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--lime-neon), var(--lime-neon-dim));
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
}

.brief-card__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--lime-neon);
  opacity: 0.85;
  margin-bottom: var(--space-2);
  padding-left: var(--space-4);
}

.brief-card__content {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  padding-left: var(--space-4);
  white-space: pre-wrap;
}

.brief-card__timestamp {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  margin-top: var(--space-3);
  padding-left: var(--space-4);
}


/* ── WEATHER WIDGET ─────────────────────────────────────── */

.weather-card {
  padding: var(--space-4) var(--space-5);
  background: var(--glass-2);
  border: var(--border-dim);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.weather-card__main {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.weather-card__icon {
  font-size: var(--text-3xl);
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.15));
}

.weather-card__temp-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weather-card__temp {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  line-height: 1;
}

.weather-card__condition {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.weather-card__details {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: var(--border-subtle);
}

.weather-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weather-detail__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.weather-detail__value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  letter-spacing: var(--tracking-wide);
}

.weather-card__hourly {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.weather-card__hourly::-webkit-scrollbar { display: none; }

.weather-hour {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 44px;
  flex-shrink: 0;
}

.weather-hour__time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.weather-hour__icon {
  font-size: var(--text-base);
  line-height: 1;
}

.weather-hour__temp {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  letter-spacing: var(--tracking-wide);
}


/* ── TODAY AGENDA ───────────────────────────────────────── */

.agenda-card {
  padding: var(--space-4) var(--space-5);
  background: var(--glass-2);
  border: var(--border-dim);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.agenda-event {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: var(--border-subtle);
  position: relative;
}
.agenda-event:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.agenda-event__time-col {
  flex-shrink: 0;
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.agenda-event__time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--cyan-text);
  letter-spacing: var(--tracking-wide);
  text-align: right;
}

.agenda-event__duration {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-wide);
}

.agenda-event__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--cyan-dim);
  flex-shrink: 0;
  margin-top: 4px;
}

.agenda-event__dot--allday {
  background: var(--indigo-dim);
}

.agenda-event__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agenda-event__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-event__location {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ── MY 3 TODAY (MITs) ──────────────────────────────────── */

.mits-card {
  padding: var(--space-4) var(--space-5);
  background: var(--glass-2);
  border: var(--border-dim);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.mit-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: var(--border-subtle);
}
.mit-item:last-child {
  border-bottom: none;
}

.mit-item__check {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.14);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--green-text);
  font-size: var(--text-sm);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.mit-item__check--done {
  background: var(--green-surface);
  border-color: var(--green-border);
}
.mit-item__check:hover {
  border-color: rgba(255,255,255,0.25);
}

.mit-item__label {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}
.mit-item__label--done {
  color: var(--text-tertiary);
  text-decoration: line-through;
}

.mit-item__del {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.mit-item__del:hover {
  color: var(--red-text);
  background: var(--red-surface);
}

.mits-add-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.mits-input {
  flex: 1;
  padding: 0.4em 0.75em;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out);
}
.mits-input:focus {
  border-color: rgba(174,255,0,0.3);
  box-shadow: 0 0 0 1px rgba(174,255,0,0.1);
}
.mits-input::placeholder {
  color: var(--text-tertiary);
}

.mits-add-btn {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(174,255,0,0.25);
  background: rgba(174,255,0,0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--lime-neon);
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.mits-add-btn:hover {
  background: rgba(174,255,0,0.16);
}
.mits-add-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}


/* ── REMINDERS ──────────────────────────────────────────── */

.reminder-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: var(--border-subtle);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.reminder-item:last-child { border-bottom: none; }
.reminder-item:hover .reminder-item__title {
  color: var(--cyan-text);
}

.reminder-item__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--orange-dim);
  flex-shrink: 0;
}
.reminder-item__dot--overdue {
  background: var(--red-core);
  box-shadow: 0 0 4px var(--red-glow);
  animation: dot-pulse 1.4s ease-in-out infinite;
}

.reminder-item__info {
  flex: 1;
  min-width: 0;
}

.reminder-item__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  transition: color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reminder-item__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-wide);
}
.reminder-item__meta--overdue {
  color: var(--red-text);
}

.reminder-open-btn {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.3em 0.7em;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  margin-top: var(--space-1);
  width: fit-content;
}
.reminder-open-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
}


/* ── NOTES ──────────────────────────────────────────────── */

.notes-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--space-2) 0;
  border-bottom: var(--border-subtle);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.notes-item:last-child { border-bottom: none; }
.notes-item:hover .notes-item__title {
  color: var(--cyan-text);
}

.notes-item__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.notes-item__folder {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-xs);
}

.notes-item__time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-wide);
  margin-left: auto;
}

.notes-item__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  transition: color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notes-item__snippet {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: var(--leading-snug);
}


/* ── EMAIL DIGEST ───────────────────────────────────────── */

.email-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: var(--border-subtle);
}
.email-item:last-child { border-bottom: none; }

.email-item__priority-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  margin-top: 5px;
  flex-shrink: 0;
}
.email-item__priority-dot--critical { background: var(--red-core); box-shadow: 0 0 4px var(--red-glow); }
.email-item__priority-dot--high { background: var(--orange-core); }
.email-item__priority-dot--medium { background: var(--cyan-dim); }
.email-item__priority-dot--low { background: var(--text-tertiary); }

.email-item__info {
  flex: 1;
  min-width: 0;
}

.email-item__sender {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--text-secondary);
  text-transform: uppercase;
}

.email-item__subject {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0;
}

.email-item__snippet {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-action-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  padding: 0.15em 0.5em;
  border-radius: var(--radius-full);
  background: var(--orange-surface);
  color: var(--orange-text);
  border: 1px solid var(--orange-border);
  flex-shrink: 0;
  margin-top: 4px;
  white-space: nowrap;
}


/* ── DAILY BRIEF BANNER (above RGL grid, not in grid) ────── */

.brief-banner {
  margin: 0 16px 0;
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg,
    rgba(174, 255, 0, 0.04) 0%,
    var(--bg-surface-1) 60%,
    var(--bg-surface-2) 100%
  );
  border: 1px solid rgba(174, 255, 0, 0.18);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(174,255,0,0.06),
    0 0 20px rgba(174,255,0,0.06),
    var(--shadow-md);
  position: relative;
  overflow: hidden;
  animation: fade-in-up var(--dur-slow) var(--ease-out) both;
  max-width: calc(1640px - 32px);
  margin-left: auto;
  margin-right: auto;
  width: calc(100% - 32px);
  box-sizing: border-box;
}

.brief-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--lime-neon), var(--lime-neon-dim));
  border-radius: var(--radius-xs) 0 0 var(--radius-xs);
}

.brief-banner__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--lime-neon);
  opacity: 0.85;
  margin-bottom: var(--space-2);
  padding-left: var(--space-4);
}

.brief-banner__content {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  padding-left: var(--space-4);
  white-space: pre-wrap;
}

.brief-banner__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  margin-top: var(--space-3);
  padding-left: var(--space-4);
}

@media (min-width: 480px) {
  .brief-banner {
    width: calc(100% - 40px);
    max-width: calc(1640px - 40px);
  }
}

@media (min-width: 768px) {
  .brief-banner {
    width: calc(100% - 48px);
    max-width: calc(1640px - 48px);
  }
}

@media (min-width: 1200px) {
  .brief-banner {
    width: calc(100% - 64px);
    max-width: calc(1640px - 64px);
  }
}


/* ── SYSTEM FOOTER (below RGL grid, not in grid) ─────────── */

.system-footer {
  padding: 0 16px 16px;
  max-width: 1640px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.system-strip--footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--glass-1);
  border: var(--border-subtle);
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  width: 100%;
  box-sizing: border-box;
}

.system-strip--footer:hover {
  background: var(--glass-2);
  border-color: rgba(255,255,255,0.12);
}

.system-strip__label-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-tertiary);
  flex: 1;
}

@media (min-width: 480px) {
  .system-footer {
    padding: 0 20px 20px;
  }
}

@media (min-width: 768px) {
  .system-footer {
    padding: 0 24px 24px;
  }
}

@media (min-width: 1200px) {
  .system-footer {
    padding: 0 32px 24px;
  }
}


/* ── QUICK LAUNCH ───────────────────────────────────────── */

/* quick-launch-grid: fills the tile, row of buttons */
.quick-launch-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-2);
  width: 100%;
  height: 100%;
  align-content: center;
}

@media (max-width: 600px) {
  .quick-launch-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* widget-inner for quicklaunch — center content vertically */
.widget-inner--quicklaunch {
  justify-content: center;
}

/* Legacy .quick-launch kept for any fallback reference */
.quick-launch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.launch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-2);
  background: var(--glass-1);
  border: var(--border-dim);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-secondary);
  transition:
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-spring),
    color var(--dur-fast) var(--ease-out);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.launch-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.launch-btn:hover {
  background: var(--glass-2);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
  color: var(--text-primary);
}

.launch-btn:active {
  transform: translateY(0);
}

.launch-btn__icon {
  font-size: var(--text-xl);
  line-height: 1;
  filter: grayscale(0.2);
}

.launch-btn__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  text-align: center;
}


/* ── SYSTEM STRIP ───────────────────────────────────────── */

.system-strip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--glass-1);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.system-strip:hover {
  background: var(--glass-2);
  border-color: rgba(255,255,255,0.12);
}

.system-strip__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-tertiary);
  flex: 1;
}

.system-strip__count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 0.15em 0.6em;
  border-radius: var(--radius-full);
  background: var(--red-surface);
  color: var(--red-text);
  border: 1px solid var(--red-border);
}

.system-strip__count--ok {
  background: var(--green-surface);
  color: var(--green-dim);
  border-color: rgba(0,232,122,0.15);
}

.system-strip__chevron {
  color: var(--text-tertiary);
  font-size: var(--text-base);
  transition: transform var(--dur-fast) var(--ease-out);
}
.system-strip:hover .system-strip__chevron {
  transform: translateX(3px);
  color: var(--text-secondary);
}


/* ── NEEDS YOU WIDGET (compact artifact list) ───────────── */

.needs-artifact {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(135deg, var(--red-bg) 0%, var(--bg-surface-1) 100%);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glow-red);
  animation: urgent-pulse var(--dur-pulse) ease-in-out infinite;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur-normal) var(--ease-spring);
  position: relative;
  overflow: hidden;
}
.needs-artifact:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px var(--red-border),
    0 0 24px rgba(255,45,45,0.50),
    0 0 60px rgba(255,45,45,0.18),
    0 8px 24px rgba(0,0,0,0.8);
}

.needs-artifact::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(255,80,80,0.2), transparent
  );
}

.needs-artifact__body {
  flex: 1;
  min-width: 0;
}

.needs-artifact__agent {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--red-text);
  margin-bottom: 3px;
  opacity: 0.8;
}

.needs-artifact__title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--red-text-on);
  line-height: var(--leading-snug);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.needs-artifact__summary {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--red-text);
  opacity: 0.7;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.needs-artifact__time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--red-text);
  opacity: 0.55;
  letter-spacing: var(--tracking-wide);
  flex-shrink: 0;
  margin-top: 2px;
}


/* ── GENERIC DATA CARD ──────────────────────────────────── */

.data-card {
  padding: var(--space-4) var(--space-5);
  background: var(--glass-2);
  border: var(--border-dim);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.data-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.10) 30%,
    rgba(255,255,255,0.16) 50%,
    rgba(255,255,255,0.10) 70%,
    transparent 100%
  );
}


/* ── RESPONSIVE ─────────────────────────────────────────── */

/* 480px — slightly larger phone / small landscape */
@media (min-width: 480px) {
  .quick-launch {
    grid-template-columns: repeat(6, 1fr);
  }
  .dash-content {
    padding: var(--space-5);
    padding-bottom: calc(var(--space-5) + 80px);
  }
}

/*
  ┌─────────────────────────────────────────────────────────────────────┐
  │  TABLET GRID — 768–1179px — 2 columns                              │
  │                                                                     │
  │  Column layout:  [col1]  [col2]                                     │
  │  widget-1  (Brief)         → span 2 (full-width header)            │
  │  widget-2  (Today)         → col1                                  │
  │  widget-3  (Needs You Now) → span 2 (critical — always prominent)  │
  │  widget-4  (Weather)       → col1                                  │
  │  widget-5  (My 3 Today)    → col2 (pairs with Weather)             │
  │  widget-6  (Reminders)     → col1                                  │
  │  widget-7  (Notes)         → col2                                  │
  │  widget-8  (Email Digest)  → span 2                                │
  │  widget-9  (Recent Docs)   → col1                                  │
  │  widget-10 (Quick Launch)  → col2                                  │
  │  widget-11 (System Strip)  → span 2 (always full-width footer)     │
  └─────────────────────────────────────────────────────────────────────┘
*/
@media (min-width: 768px) {
  .dash-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-flow: dense;
    gap: var(--space-4);
    padding: var(--space-6);
    padding-bottom: calc(var(--space-6) + 80px);
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
    /* Reset flex properties from mobile */
    flex-direction: unset;
  }

  /* Full-width widgets */
  .dash-widget-1,
  .dash-widget-3,
  .dash-widget-8,
  .dash-widget-11 {
    grid-column: 1 / -1;
  }

  /* Single-column widgets — explicit placement for reliable order */
  .dash-widget-2  { grid-column: 1; }
  .dash-widget-4  { grid-column: 1; }
  .dash-widget-5  { grid-column: 2; }
  .dash-widget-6  { grid-column: 1; }
  .dash-widget-7  { grid-column: 2; }
  .dash-widget-9  { grid-column: 1; }
  .dash-widget-10 { grid-column: 2; }
}

/*
  ┌─────────────────────────────────────────────────────────────────────┐
  │  DESKTOP GRID — ≥1180px — 3 columns                                │
  │                                                                     │
  │  Column layout:  [col1]     [col2]     [col3]                      │
  │  widget-1  (Brief)         → span 3 (atmospheric full-width header)│
  │  widget-2  (Today Agenda)  → span 2 (list-heavy; deserves space)  │
  │  widget-4  (Weather)       → col3 (compact card, right of agenda)  │
  │  widget-3  (Needs You Now) → span 2 (critical; always prominent)   │
  │  widget-5  (My 3 Today)    → col3 (pairs with Needs You Now)       │
  │  widget-6  (Reminders)     → col1                                  │
  │  widget-7  (Notes)         → col2                                  │
  │  widget-8  (Email Digest)  → span 2                                │
  │  widget-9  (Recent Docs)   → col3                                  │
  │  widget-10 (Quick Launch)  → span 2                                │
  │  widget-11 (System Strip)  → span 3 (always full-width footer)     │
  └─────────────────────────────────────────────────────────────────────┘
*/
@media (min-width: 1180px) {
  .dash-content {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1600px;
    gap: var(--space-5);
    padding: var(--space-6) var(--space-8);
    padding-bottom: calc(var(--space-6) + 80px);
  }

  /* Full-width widgets (span all 3 cols) */
  .dash-widget-1,
  .dash-widget-11 {
    grid-column: 1 / -1;
  }

  /* Two-col spans */
  .dash-widget-2  { grid-column: 1 / span 2; }
  .dash-widget-3  { grid-column: 1 / span 2; }
  .dash-widget-8  { grid-column: 1 / span 2; }
  .dash-widget-10 { grid-column: 1 / span 2; }

  /* Single-column placements */
  .dash-widget-4  { grid-column: 3; }
  .dash-widget-5  { grid-column: 3; }
  .dash-widget-6  { grid-column: 1; }
  .dash-widget-7  { grid-column: 2; }
  .dash-widget-9  { grid-column: 3; }
}


/* ── RECENT DOCS ────────────────────────────────────────── */

.doc-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: var(--border-subtle);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.doc-item:last-child { border-bottom: none; }
.doc-item:hover .doc-item__name {
  color: var(--cyan-text);
}

.doc-item__icon {
  font-size: var(--text-base);
  line-height: 1;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.doc-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-item__name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--dur-fast) var(--ease-out);
}

.doc-item__meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-item__time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-wide);
  flex-shrink: 0;
  white-space: nowrap;
}


/* ── REMINDER SOURCE CHIP ───────────────────────────────── */

.reminder-source-chip {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  padding: 0.1em 0.45em;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  white-space: nowrap;
}

.reminder-source-chip--google {
  background: rgba(66, 133, 244, 0.12);
  color: #7baff8;
  border: 1px solid rgba(66, 133, 244, 0.22);
}

.reminder-source-chip--apple {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.09);
}


/* ── CHANGE PASSWORD MODAL ──────────────────────────────── */

.chpw-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.chpw-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.chpw-input {
  padding: 0.55em 0.85em;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  outline: none;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
  -webkit-appearance: none;
  width: 100%;
  box-sizing: border-box;
}
.chpw-input:focus {
  border-color: rgba(174,255,0,0.35);
  box-shadow: 0 0 0 2px rgba(174,255,0,0.10);
}
.chpw-input::placeholder {
  color: var(--text-tertiary);
}

.chpw-error {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--red-surface);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--red-text);
}

.chpw-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-6) 0;
  text-align: center;
}

.chpw-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--green-surface);
  border: 1px solid var(--green-border);
  color: var(--green-text);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
}

.chpw-success__text {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.chpw-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: var(--text-base);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  line-height: 1;
  margin-left: auto;
}
.chpw-close-btn:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.06);
}

/* Gear icon button in the topbar */
.chpw-topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: var(--text-base);
  transition:
    color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
  line-height: 1;
  flex-shrink: 0;
}
.chpw-topbar-btn:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}

/* ── ENTRY STAGGER (legacy — kept for non-RGL fallback) ─── */

.dash-widget-1  { animation: fade-in-up var(--dur-slow) var(--ease-out) 0ms    both; }
.dash-widget-2  { animation: fade-in-up var(--dur-slow) var(--ease-out) 60ms   both; }
.dash-widget-3  { animation: fade-in-up var(--dur-slow) var(--ease-out) 120ms  both; }
.dash-widget-4  { animation: fade-in-up var(--dur-slow) var(--ease-out) 180ms  both; }
.dash-widget-5  { animation: fade-in-up var(--dur-slow) var(--ease-out) 240ms  both; }
.dash-widget-6  { animation: fade-in-up var(--dur-slow) var(--ease-out) 300ms  both; }
.dash-widget-7  { animation: fade-in-up var(--dur-slow) var(--ease-out) 360ms  both; }
.dash-widget-8  { animation: fade-in-up var(--dur-slow) var(--ease-out) 420ms  both; }
.dash-widget-9  { animation: fade-in-up var(--dur-slow) var(--ease-out) 480ms  both; }
.dash-widget-10 { animation: fade-in-up var(--dur-slow) var(--ease-out) 540ms  both; }
.dash-widget-11 { animation: fade-in-up var(--dur-slow) var(--ease-out) 600ms  both; }


/* ══════════════════════════════════════════════════════════
   REACT-GRID-LAYOUT — Widget Board v3.0 (v1 WidthProvider)
   ══════════════════════════════════════════════════════════ */

/* Board container — the WidthProvider wrapper div must be full-width.
   WidthProvider measures THIS element's clientWidth and passes it to Responsive.
   max-width caps it at 1640px so tiles don't stretch too wide on ultra-wide monitors. */
.rgl-board {
  flex: 1;
  /* Comfortable outer padding — WidthProvider subtracts this from the measured width
     automatically because it reads clientWidth of the outer wrapper. */
  padding: 16px 16px calc(16px + 80px);
  /* width:100% (NOT 100vw — vw includes scrollbar width and causes overflow on mobile).
     box-sizing:border-box so padding is included in the measured width.
     overflow-x:hidden prevents any child from pushing past the viewport edge. */
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
  /* Override flex-direction + gap from .dash-content */
  flex-direction: unset !important;
  gap: unset !important;
}

@media (min-width: 480px) {
  .rgl-board {
    padding: 20px 20px calc(20px + 80px);
  }
}

@media (min-width: 768px) {
  .rgl-board {
    padding: 24px 24px calc(24px + 80px);
  }
}

@media (min-width: 1200px) {
  .rgl-board {
    padding: 24px 32px calc(24px + 80px);
  }
}

/* RGL layout inner div */
.rgl-layout {
  /* RGL sets width/height via inline styles; we just ensure overflow visible */
}

/* Individual widget grid item — iOS home screen tile aesthetic */
.rgl-widget {
  /* RGL positions this absolutely — inner content fills it */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* iOS-style rounded corners — 22px like iOS large widgets */
  border-radius: 22px;
  /* REMOVED: animation: fade-in-up — was overriding RGL's inline transform positioning,
     causing all tiles to collapse to top-left. RGL must fully own `transform` on .rgl-widget.
     Entrance fade on the inner .widget-inner can use opacity-only animation if desired. */
  /* Glass card background */
  background: var(--glass-2);
  border: var(--border-dim);
  box-shadow:
    var(--shadow-md),
    0 1px 0 rgba(255,255,255,0.04) inset;
  position: relative;
  /* min-width:0 ensures the tile never forces its flex/grid parent wider than the viewport */
  min-width: 0;
}

.rgl-widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.10) 30%,
    rgba(255,255,255,0.16) 50%,
    rgba(255,255,255,0.10) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
  border-radius: 22px 22px 0 0;
}

/* Editing state — lime outline glow on hover */
.rgl-widget--editing {
  border-color: rgba(174, 255, 0, 0.15);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.rgl-widget--editing:hover {
  border-color: rgba(174, 255, 0, 0.35);
  box-shadow:
    0 0 0 1px rgba(174, 255, 0, 0.12),
    0 0 16px rgba(174, 255, 0, 0.08),
    var(--shadow-md);
}

/* Widget inner — fills the RGL cell */
.widget-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-4) var(--space-4) var(--space-3);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  /* min-width:0 on a flex child prevents content from blowing out the tile width */
  min-width: 0;
}

/* Scrollable content area inside a widget */
.widget-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.06) transparent;
  min-height: 0; /* allow flex child to shrink */
}

.widget-scroll::-webkit-scrollbar {
  width: 3px;
}

.widget-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.widget-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
}

/* Override .data-card padding when used inside widget-scroll */
.widget-scroll.data-card,
.widget-scroll.weather-card,
.widget-scroll.agenda-card,
.widget-scroll.mits-card {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.widget-scroll.data-card::before,
.widget-scroll.weather-card::before,
.widget-scroll.agenda-card::before {
  display: none;
}


/* ── DRAG HANDLE ────────────────────────────────────────── */

.widget-drag-handle {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  border-radius: var(--radius-sm);
  background: rgba(174, 255, 0, 0.06);
  border: 1px solid rgba(174, 255, 0, 0.15);
  color: rgba(174, 255, 0, 0.5);
  z-index: 10;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
  user-select: none;
}

.widget-drag-handle:hover {
  background: rgba(174, 255, 0, 0.14);
  border-color: rgba(174, 255, 0, 0.35);
  color: var(--lime-neon);
}

.widget-drag-handle:active {
  cursor: grabbing;
  background: rgba(174, 255, 0, 0.20);
}

.widget-drag-handle__dots {
  font-size: 14px;
  line-height: 1;
  font-family: var(--font-mono);
}

/* Push widget label text left when drag handle is visible */
.widget-inner:has(.widget-drag-handle) .dash-section-label {
  padding-right: 32px;
}


/* ── RGL RESIZE HANDLE — lime-accented ──────────────────── */

/* Override react-resizable default handle */
.react-resizable-handle {
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.rgl-widget--editing .react-resizable-handle {
  opacity: 1;
}

.react-resizable-handle-se {
  width: 16px !important;
  height: 16px !important;
  bottom: 4px !important;
  right: 4px !important;
  background-image: none !important;
  border-bottom: 2px solid rgba(174, 255, 0, 0.5) !important;
  border-right: 2px solid rgba(174, 255, 0, 0.5) !important;
  border-radius: 0 0 var(--radius-xs) 0;
  cursor: se-resize;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.react-resizable-handle-se:hover {
  border-color: var(--lime-neon) !important;
  box-shadow: 2px 2px 6px rgba(174, 255, 0, 0.25);
}


/* ── RGL PLACEHOLDER (drag ghost) ───────────────────────── */

.react-grid-placeholder {
  background: rgba(174, 255, 0, 0.04) !important;
  border: 1px solid rgba(174, 255, 0, 0.25) !important;
  border-radius: 22px !important;
  box-shadow:
    0 0 0 1px rgba(174, 255, 0, 0.08),
    0 0 20px rgba(174, 255, 0, 0.06) !important;
  opacity: 1 !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  /* Lime shimmer animation */
  animation: rgl-placeholder-shimmer 1.5s ease-in-out infinite;
}

@keyframes rgl-placeholder-shimmer {
  0%, 100% { border-color: rgba(174, 255, 0, 0.20); box-shadow: 0 0 12px rgba(174, 255, 0, 0.05); }
  50%       { border-color: rgba(174, 255, 0, 0.40); box-shadow: 0 0 24px rgba(174, 255, 0, 0.12); }
}


/* ── EDIT MODE BANNER ───────────────────────────────────── */

.edit-mode-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: rgba(174, 255, 0, 0.05);
  border-bottom: 1px solid rgba(174, 255, 0, 0.14);
  animation: fade-in-up var(--dur-fast) var(--ease-out) both;
}

.edit-mode-banner__icon {
  font-size: var(--text-base);
  color: var(--lime-neon);
  opacity: 0.8;
  flex-shrink: 0;
}

.edit-mode-banner__text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(174, 255, 0, 0.65);
  letter-spacing: var(--tracking-wide);
  flex: 1;
}

.edit-mode-banner__done {
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.75em;
  background: rgba(174, 255, 0, 0.12);
  border: 1px solid rgba(174, 255, 0, 0.25);
  border-radius: var(--radius-full);
  color: var(--lime-neon);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}

.edit-mode-banner__done:hover {
  background: rgba(174, 255, 0, 0.20);
}


/* ── CUSTOMIZE BUTTON (topbar) ──────────────────────────── */

.customize-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.3em 0.75em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  flex-shrink: 0;
}

.customize-btn:hover {
  background: rgba(174, 255, 0, 0.08);
  border-color: rgba(174, 255, 0, 0.20);
  color: rgba(174, 255, 0, 0.75);
}

.customize-btn__icon {
  font-size: var(--text-base);
  line-height: 1;
}

.customize-btn__label {
  /* Hide label on very small screens */
}

@media (max-width: 400px) {
  .customize-btn__label {
    display: none;
  }
}


/* ── EDIT MODE CONTROLS (topbar — shown when editing) ───── */

.edit-mode-controls {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.reset-layout-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.6em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.reset-layout-btn:hover {
  background: rgba(255, 100, 100, 0.08);
  border-color: rgba(255, 100, 100, 0.20);
  color: var(--red-text);
}

.done-editing-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.75em;
  background: rgba(174, 255, 0, 0.12);
  border: 1px solid rgba(174, 255, 0, 0.30);
  border-radius: var(--radius-md);
  color: var(--lime-neon);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}

.done-editing-btn:hover {
  background: rgba(174, 255, 0, 0.20);
  box-shadow: 0 0 8px rgba(174, 255, 0, 0.18);
}


/* ── BRIEF CARD inside RGL ──────────────────────────────── */

/* brief-card is the full-width featured header widget */
.rgl-widget .brief-card {
  height: 100%;
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg,
    rgba(174, 255, 0, 0.04) 0%,
    var(--bg-surface-1) 60%,
    var(--bg-surface-2) 100%
  );
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* Agenda card inside RGL */
.rgl-widget .agenda-card {
  padding: 0;
  border: none;
  box-shadow: none;
}

/* Weather card inside RGL */
.rgl-widget .weather-card {
  padding: 0;
  border: none;
  box-shadow: none;
}


/* ── RGL OVERRIDE — remove double-border from data-card ─── */

/* data-card pseudo-element top-glow line overrides — handled at widget level */
.rgl-widget .data-card {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.rgl-widget .data-card::before {
  display: none;
}


/* ── TOKEN NOTES ────────────────────────────────────────── */
/* --lime-neon / --lime-neon-dim   → defined in logo.css     */
/* --glass-1 / --glass-2 / --glass-3 → defined in tokens.css */
/* All RGL widget styles consume these tokens from those sources. */
