/* ════════════════════════════════════════════════════════════════
   event-calendar.css  — D&D Event Planning Calendar View
   Module-specific styles only; reuses global.css tokens.
════════════════════════════════════════════════════════════════ */

/* ─── View Switcher ──────────────────────────────────────────── */
.view-switcher {
  display: flex;
  border: 1.5px solid var(--gray-200);
  border-radius: 50px;
  overflow: hidden;
  background: var(--white);
}
.view-btn {
  padding: 7px 18px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.02em;
}
.view-btn:hover  { background: var(--gray-50); color: var(--color-title); }
.view-btn.active { background: var(--gradient-cta); color: var(--white); }

/* ─── Calendar Header ────────────────────────────────────────── */
.cal-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 auto 20px;
  max-width: 1000px;
  flex-wrap: wrap;
}
.cal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cal-nav-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--color-title);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  font-weight: 700;
}
.cal-nav-btn:hover { background: var(--crimson-pale); border-color: var(--color-title); }
.cal-today-btn {
  padding: 7px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--text-mid);
  font-size: 12.5px; font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}
.cal-today-btn:hover { background: var(--gray-50); border-color: var(--gray-300); color: var(--color-title); }
.cal-title {
  font-family: var(--font-serif);
  font-size: 26px; font-weight: 700;
  color: var(--color-title);
  letter-spacing: 0.02em;
  flex: 1; min-width: 0;
}
.cal-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-soft);
  font-family: var(--font-body);
  flex-wrap: wrap;
}
.legend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── View container ─────────────────────────────────────────── */
.cal-view { animation: fadeInView .22s ease; }
.cal-view.hidden { display: none !important; }
@keyframes fadeInView { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* ════════════════════════════════════════════════════════════════
   MONTH VIEW
════════════════════════════════════════════════════════════════ */
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.month-dow {
  background: linear-gradient(to right, var(--gray-50), var(--white));
  padding: 12px 10px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-soft);
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.month-dow.weekend { color: var(--color-body); }
.month-day {
  border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  aspect-ratio: 1 / 0.92;
  min-height: 100px;
  padding: 8px 6px 6px;
  cursor: pointer;
  transition: background .15s ease;
  display: flex; flex-direction: column;
  overflow: hidden;
  min-width: 0;
  box-sizing: border-box;
}
.month-day:hover { background: var(--gray-50); }
.month-day.today {
  background: linear-gradient(135deg, rgba(161,74,121,0.06) 0%, rgba(196,116,143,0.04) 100%);
}
.month-day.today .day-num {
  background: var(--gradient-cta);
  color: var(--white);
  box-shadow: 0 2px 10px rgba(161,74,121,0.35);
}
.month-day.other-month { background: var(--gray-50); opacity: 0.55; }
.month-day:nth-child(7n) { border-right: none; }
.day-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 12.5px; font-weight: 700;
  color: var(--text-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-bottom: 4px;
  transition: var(--transition);
  font-family: var(--font-body);
}
.month-day.weekend .day-num { color: var(--color-body); }
.month-task {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 11px; font-weight: 600;
  margin-bottom: 2px;
  cursor: pointer;
  transition: filter .15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-body);
  line-height: 1.4;
}
.month-task:hover { filter: brightness(0.92); }
.month-task.done  { opacity: 0.5; text-decoration: line-through; }
.task-dot {
  display: inline-block;
  vertical-align: middle;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  margin-top: -2px;
  flex-shrink: 0;
}
.month-more {
  font-size: 10.5px;
  color: var(--text-soft); font-weight: 600;
  padding: 2px 7px;
  cursor: pointer;
  border-radius: 4px;
  transition: background .15s;
  margin-top: auto;
}
.month-more:hover { background: var(--crimson-pale); color: var(--color-title); }

/* ════════════════════════════════════════════════════════════════
   WEEK VIEW
════════════════════════════════════════════════════════════════ */
.week-wrap {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}
.week-header {
  display: grid;
  grid-template-columns: 64px repeat(7, 1fr);
  background: linear-gradient(to right, var(--gray-50), var(--white));
  border-bottom: 1px solid var(--gray-100);
}
.week-gutter { border-right: 1px solid var(--gray-100); }
.week-day-hdr {
  padding: 14px 8px 12px;
  text-align: center;
  border-left: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background .15s;
}
.week-day-hdr:hover { background: var(--gray-50); }
.week-day-hdr.today { background: rgba(161,74,121,0.06); }
.week-dow {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-soft);
}
.week-num {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 700;
  color: var(--text-dark);
  line-height: 1.1; margin-top: 2px;
}
.week-day-hdr.today .week-num {
  width: 36px; height: 36px;
  background: var(--gradient-cta); color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 2px auto 0; font-size: 18px;
  box-shadow: 0 2px 10px rgba(161,74,121,0.35);
}
.week-allday {
  display: grid;
  grid-template-columns: 64px repeat(7, 1fr);
  border-bottom: 1px solid var(--gray-100);
  min-height: 38px;
}
.week-allday-label {
  padding: 8px 8px 8px 10px;
  font-size: 10px; font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase; letter-spacing: .8px;
  border-right: 1px solid var(--gray-100);
  display: flex; align-items: center;
}
.week-allday-cell {
  border-left: 1px solid var(--gray-100);
  padding: 4px; display: flex; flex-direction: column; gap: 2px;
}
.week-body {
  display: grid;
  grid-template-columns: 64px repeat(7, 1fr);
  max-height: 580px;
  overflow-y: auto;
}
.week-time-col {
  border-right: 1px solid var(--gray-100);
  display: flex; flex-direction: column;
}
.week-hour-label {
  height: 52px; padding: 4px 8px 0;
  font-size: 10px; color: var(--text-soft); font-weight: 600;
  font-family: var(--font-body);
  display: flex; align-items: flex-start;
  flex-shrink: 0;
}
.week-day-col {
  border-left: 1px solid var(--gray-100);
  display: flex; flex-direction: column;
  position: relative;
}
.week-day-col.today { background: rgba(161,74,121,0.025); }
.week-hour-row {
  height: 52px;
  border-bottom: 1px solid var(--gray-100);
  position: relative; flex-shrink: 0;
  cursor: pointer; transition: background .12s;
}
.week-hour-row:hover { background: rgba(161,74,121,0.04); }
.week-event {
  position: absolute;
  left: 3px; right: 3px;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 11px; font-weight: 600;
  cursor: pointer; z-index: 2;
  transition: filter .15s;
  overflow: hidden;
  font-family: var(--font-body);
  line-height: 1.4;
  min-height: 42px;
}
.week-event:hover { filter: brightness(0.9); }
.week-event.done  { opacity: 0.45; text-decoration: line-through; }
.now-line {
  position: absolute; left: 0; right: 0;
  height: 2px; background: var(--color-title);
  z-index: 5; pointer-events: none;
}
.now-line::before {
  content: '';
  position: absolute; left: -4px; top: -4px;
  width: 10px; height: 10px;
  border-radius: 50%; background: var(--color-title);
}

/* ════════════════════════════════════════════════════════════════
   AGENDA VIEW
════════════════════════════════════════════════════════════════ */
#agenda-wrap {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
}
.agenda-day-header {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px 12px;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(to right, var(--gray-50), var(--white));
  position: sticky; top: 0; z-index: 5;
}
.agenda-day-header.today {
  background: linear-gradient(to right, rgba(161,74,121,0.07), rgba(196,116,143,0.03));
}
.agenda-day-num {
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 700;
  color: var(--color-title);
  line-height: 1; min-width: 40px; text-align: center;
}
.agenda-day-header.today .agenda-day-num {
  width: 44px; height: 44px;
  background: var(--gradient-cta); color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 10px rgba(161,74,121,0.35);
}
.agenda-day-label  { flex: 1; }
.agenda-day-name   { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.agenda-day-date   { font-size: 11.5px; color: var(--text-soft); font-style: italic; }
.agenda-add-btn    { opacity: 0; transition: opacity .2s; }
.agenda-day-header:hover .agenda-add-btn { opacity: 1; }
.agenda-task-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--gray-50);
  cursor: pointer; transition: background .15s;
}
.agenda-task-row:hover { background: var(--gray-50); }
.agenda-task-row.done .agenda-task-title { text-decoration: line-through; opacity: 0.5; }
.agenda-time {
  font-size: 11px; color: var(--text-soft); font-weight: 600;
  min-width: 44px; padding-top: 2px;
  font-family: var(--font-body);
}
.agenda-cat-bar {
  width: 4px; border-radius: 3px;
  align-self: stretch; flex-shrink: 0; min-height: 20px;
}
.agenda-task-info  { flex: 1; min-width: 0; }
.agenda-task-title {
  font-size: 13.5px; font-weight: 600;
  color: var(--text-dark); margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.agenda-task-meta  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agenda-task-project { font-size: 11px; color: var(--text-soft); font-style: italic; }
.agenda-task-priority {
  font-size: 10px; font-weight: 700;
  padding: 1px 8px; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .5px;
}
.priority-high   { background: rgba(220,38,38,0.1);   color: #dc2626; }
.priority-medium { background: rgba(201,169,110,0.15); color: #9a6a1a; }
.priority-low    { background: rgba(5,150,105,0.1);    color: #059669; }
.agenda-task-actions { display: none; }
.agenda-no-tasks {
  padding: 60px 24px; text-align: center;
  font-size: 14px; color: var(--text-soft);
}
.agenda-task-number { font-size: 10.5px; color: var(--text-soft); font-weight: 600; margin-left: 7px; }
.agenda-supplier    { font-size: 11px; color: var(--text-soft); font-style: italic; }
.agenda-budget-chip { font-size: 10.5px; color: var(--gray-500); font-weight: 600; }
.status-icon-col    { font-size: 16px; flex-shrink: 0; padding-top: 2px; min-width: 24px; }

/* ─── Cal status badge & tag chip ────────────────────────────── */
.cal-status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 99px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .3px;
}
.cal-tag-chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 700; letter-spacing: .2px;
}

/* ─── Day Panel (slide-in) ───────────────────────────────────── */
.day-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(57,56,56,0.4); backdrop-filter: blur(4px);
  z-index: 150; opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
}
.day-panel-overlay.open { opacity: 1; pointer-events: auto; }
.day-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 360px;
  background: var(--white); z-index: 160;
  box-shadow: var(--shadow-xl);
  border-left: 1px solid var(--gray-100);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.4,0,.2,1);
}
.day-panel.open { transform: none; }
.day-panel-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(to right, var(--gray-50), var(--white));
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.day-panel-date  { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--color-title); }
.day-panel-count { font-size: 12px; color: var(--text-soft); margin-top: 2px; font-style: italic; }
.day-panel-body  { flex: 1; overflow-y: auto; padding: 12px 0; }
.panel-task-card {
  margin: 0 12px 10px;
  border-radius: var(--radius-md);
  padding: 13px 14px;
  border: 1px solid var(--gray-100);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  display: flex; gap: 12px; align-items: flex-start;
  transition: var(--transition);
}
.panel-task-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.panel-task-card.done .panel-task-title { text-decoration: line-through; opacity: 0.5; }
.panel-cat-indicator { width: 4px; border-radius: 3px; align-self: stretch; flex-shrink: 0; }
.panel-task-body  { flex: 1; min-width: 0; }
.panel-task-title { font-size: 13.5px; font-weight: 600; color: var(--text-dark); margin-bottom: 5px; line-height: 1.35; }
.panel-task-meta  { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.panel-task-time  { font-size: 11px; color: var(--text-soft); }
.panel-task-project { font-size: 11px; color: var(--text-soft); font-style: italic; }
.panel-task-number  { font-size: 10.5px; color: var(--text-soft); font-weight: 600; margin-left: 7px; }
.panel-supplier     { font-size: 11px; color: var(--text-soft); font-style: italic; }
.panel-budget       { font-size: 11px; color: var(--gray-500); font-weight: 600; }
.panel-tags         { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }

/* ─── Task Detail Modal ──────────────────────────────────────── */
.task-detail-modal  { width: 580px; }
.detail-project-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 600;
  background: var(--crimson-pale); color: var(--color-title);
  margin-top: 4px;
}
.detail-badges      { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
/* category badges removed — status badge handles all color coding */
.detail-desc  { font-size: 13.5px; color: var(--text-mid); line-height: 1.6; margin-bottom: 18px; }
.detail-grid  { display: flex; flex-direction: column; gap: 0; margin-bottom: 16px; border: 1px solid var(--gray-100); border-radius: var(--radius-md); overflow: hidden; }
.detail-row   { display: flex; align-items: baseline; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--gray-50); }
.detail-row:last-child { border-bottom: none; }
.detail-row-label { font-size: 11px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .5px; min-width: 90px; flex-shrink: 0; }
.detail-row-value { font-size: 13px; color: var(--text-dark); font-weight: 500; }
.detail-row-value.mono { font-family: monospace; font-size: 12.5px; }
.over-budget  { color: #dc2626; }
.under-budget { color: #059669; }
.budget-flag  { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgba(220,38,38,0.1); color: #dc2626; margin-left: 6px; }
.budget-flag.ok { background: rgba(5,150,105,0.1); color: #059669; }
.detail-tags  { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 18px; }
/* Subtasks */
.detail-section-title { font-size: 11px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 8px; margin-top: 18px; }
.detail-subtasks  { list-style: none; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.detail-subtask-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.subtask-status-icon { font-size: 14px; flex-shrink: 0; }
.subtask-name { flex: 1; color: var(--text-dark); }
.subtask-name.done { text-decoration: line-through; color: var(--text-soft); }
.subtask-deadline { font-size: 11px; color: var(--text-soft); white-space: nowrap; }
.subtask-users    { font-size: 11px; color: var(--text-soft); font-style: italic; }
/* Comments */
.detail-comments  { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.detail-comment   { display: flex; gap: 10px; align-items: flex-start; }
.comment-avatar   { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; }
.comment-body     { flex: 1; background: var(--gray-50); border-radius: var(--radius-md); padding: 9px 12px; }
.comment-header   { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-header strong { font-size: 12.5px; color: var(--text-dark); }
.comment-date     { font-size: 11px; color: var(--text-soft); }
.comment-text     { font-size: 12.5px; color: var(--text-mid); line-height: 1.55; }

/* ─── Panel empty state ──────────────────────────────────────── */
.panel-empty       { padding: 40px 20px; text-align: center; color: var(--text-soft); }
.panel-empty-icon  { font-size: 36px; margin-bottom: 10px; }
.panel-empty-text  { font-size: 13.5px; font-weight: 600; color: var(--text-mid); }
.panel-empty-sub   { font-size: 12px; margin-top: 4px; }

/* ─── Status section (inside task detail modal) ──────────────── */
.status-section     { padding: 14px 24px; }
.status-btn-group   { display: flex; gap: 8px; flex-wrap: wrap; }
.status-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 99px;
  border: 1.5px solid var(--gray-200);
  background: var(--white); color: var(--text-soft);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.status-btn:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-300); color: var(--text-dark); }
.status-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.status-btn-active  { font-weight: 700; }

/* ─── Comments section (task detail modal) ───────────────────── */
.comments-section    { padding: 14px 24px 0; }
.no-comments         { font-size: 12.5px; color: var(--text-soft); padding: 8px 0 12px; font-style: italic; }
.comment-count       { display: inline-flex; align-items: center; justify-content: center;
                       min-width: 20px; height: 20px; padding: 0 6px;
                       background: var(--gray-100); color: var(--text-soft);
                       border-radius: 99px; font-size: 11px; font-weight: 700;
                       margin-left: 6px; vertical-align: middle; }
.comment-new         { animation: slideIn .3s ease; }
@keyframes slideIn   { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ─── Comment header (author + date + actions) ───────────────── */
.comment-header      { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.comment-actions     { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.comment-action-btn  {
  padding: 2px 8px; border-radius: 6px; border: 1px solid var(--gray-200);
  background: transparent; color: var(--text-soft); font-size: 11px;
  cursor: pointer; transition: var(--transition);
}
.comment-action-btn:hover            { background: var(--gray-50); color: var(--text-dark); border-color: var(--gray-300); }
.comment-action-danger:hover         { background: rgba(220,38,38,.08); color: #dc2626; border-color: #dc2626; }
.edit-comment-form                   { }

/* ─── Add comment box ────────────────────────────────────────── */
.add-comment-wrap    { margin-top: 14px; padding-bottom: 14px; }
.comment-input       { width: 100%; box-sizing: border-box; resize: vertical;
                       font-size: 13px; padding: 9px 12px;
                       border: 1.5px solid var(--gray-200); border-radius: var(--radius-md);
                       background: var(--gray-50); color: var(--text-dark);
                       transition: border-color .2s; }
.comment-input:focus { outline: none; border-color: var(--color-primary); background: var(--white); }
.add-comment-row     { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ─── Card actions footer (Mark as Complete / done info) ─────── */
.card-actions-footer { padding: 14px 24px; display: flex; align-items: center; gap: 12px; }
.completed-info      { font-size: 13px; color: #0e7a40; font-weight: 600; }
.no-complete-notice  { font-size: 12.5px; color: var(--text-soft); font-style: italic; }

/* ─── Modal footer ───────────────────────────────────────────── */
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--gray-100);
  display: flex; justify-content: flex-end; gap: 10px;
  background: var(--gray-50); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ─── Completion modal specific ──────────────────────────────── */
.complete-modal-desc  { font-size: 13.5px; color: var(--text-mid); margin: 0 0 18px; font-weight: 600; }
.form-group           { margin-bottom: 16px; }
.form-label           { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-soft);
                        text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.required-star        { color: #dc2626; }
.form-control         { width: 100%; box-sizing: border-box; padding: 9px 12px;
                        border: 1.5px solid var(--gray-200); border-radius: var(--radius-md);
                        font-size: 13.5px; color: var(--text-dark); background: var(--white);
                        transition: border-color .2s; }
.form-control:focus   { outline: none; border-color: var(--color-primary); }
.modal-budget-compare { background: var(--gray-50); border-radius: var(--radius-md);
                        border: 1px solid var(--gray-100); padding: 10px 14px; margin-bottom: 16px; }
.budget-compare-row   { display: flex; justify-content: space-between; align-items: center;
                        font-size: 13px; }
.budget-compare-label { color: var(--text-soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.budget-compare-amount{ font-weight: 700; color: var(--text-dark); }
.spent-input-wrap     { display: flex; align-items: center; gap: 6px; }
.spent-currency       { font-size: 16px; font-weight: 700; color: var(--text-mid); flex-shrink: 0; }
.spent-input          { flex: 1; }
.spent-budget-hint    { font-size: 12px; font-weight: 600; margin-top: 8px; padding: 5px 10px;
                        border-radius: var(--radius-md); }
.hint-over            { background: rgba(220,38,38,.1); color: #dc2626; }
.hint-ok              { background: rgba(5,150,105,.1);  color: #059669; }

/* ─── Toast notifications ────────────────────────────────────── */
.toast-container { position: fixed; bottom: 28px; right: 28px; z-index: 9999;
                   display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast           { display: flex; align-items: flex-start; gap: 10px;
                   background: var(--white); color: var(--text-dark);
                   padding: 12px 16px; border-radius: var(--radius-md);
                   box-shadow: var(--shadow-xl); border: 1px solid var(--gray-100);
                   font-size: 13.5px; min-width: 240px; max-width: 360px;
                   animation: toastIn .3s ease;
                   pointer-events: auto; }
.toast.fade-out  { animation: toastOut .35s ease forwards; }
.toast-icon      { font-size: 18px; flex-shrink: 0; }
.toast-msg       { flex: 1; line-height: 1.5; }
@keyframes toastIn  { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes toastOut { from { opacity:1; transform:none; } to { opacity:0; transform:translateY(8px); } }

/* ─── Budget section wrapper ─────────────────────────────────── */
.budget-section     { padding: 14px 24px; }

/* ─── Supplier selector row ─────────────────────────────────── */
.supplier-sel-form    { }
.supplier-selector-row{ margin-bottom: 4px; }

/* ─── Supplier card (mirrors distribuidores detail modal) ────── */
.supplier-card          { background: var(--gray-50); border: 1px solid var(--gray-100);
                          border-radius: var(--radius-md); overflow: hidden; }
.supplier-card-header   { display: flex; align-items: center; gap: 14px;
                          padding: 14px 16px; border-bottom: 1px solid var(--gray-100); }
.supplier-card-avatar   { width: 48px; height: 48px; border-radius: 50%;
                          display: flex; align-items: center; justify-content: center;
                          font-size: 15px; font-weight: 800; color: #fff; flex-shrink: 0;
                          letter-spacing: .5px; }
.supplier-card-info     { flex: 1; min-width: 0; }
.supplier-card-name     { font-size: 14.5px; font-weight: 700; color: var(--text-dark);
                          white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
                          margin-bottom: 4px; }
.supplier-type-badge    { display: inline-block; font-size: 11px; font-weight: 700;
                          padding: 2px 9px; border-radius: 99px;
                          background: var(--gray-100); color: var(--text-soft);
                          letter-spacing: .3px; text-transform: uppercase; }
.supplier-card-row      { display: flex; align-items: flex-start; gap: 10px;
                          padding: 9px 16px; font-size: 12.5px; color: var(--text-mid);
                          border-bottom: 1px solid var(--gray-50); line-height: 1.5; }
.supplier-card-row a    { color: inherit; text-decoration: none; }
.supplier-card-row a:hover{ color: var(--color-primary); text-decoration: underline; }
.supplier-card-icon     { flex-shrink: 0; font-size: 14px; margin-top: 1px; }
.supplier-social-links  { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; }
.supplier-link-chip     { display: inline-flex; align-items: center; gap: 5px;
                          padding: 4px 10px; border-radius: 99px; font-size: 12px;
                          font-weight: 600; background: var(--white); color: var(--text-mid);
                          border: 1px solid var(--gray-200); text-decoration: none;
                          transition: var(--transition); }
.supplier-link-chip:hover{ background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ─── Subtask supplier rows ──────────────────────────────────── */
.detail-subtask-row.has-supplier { flex-direction: column; align-items: flex-start; gap: 6px; }
.detail-subtask-row.has-supplier .subtask-main {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%;
}
.subtask-supplier-row   { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
                          width: 100%; padding: 6px 10px;
                          background: var(--gray-50); border-radius: var(--radius-md);
                          border: 1px solid var(--gray-100); margin-left: 24px; }
.subtask-sup-avatar     { width: 26px; height: 26px; border-radius: 50%;
                          display: flex; align-items: center; justify-content: center;
                          font-size: 9px; font-weight: 800; color: #fff; flex-shrink: 0; }
.subtask-sup-info       { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.subtask-sup-name       { font-size: 12px; font-weight: 700; color: var(--text-dark);
                          white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subtask-sup-type       { font-size: 10px; color: var(--text-soft); text-transform: uppercase;
                          letter-spacing: .3px; font-weight: 600; }
.subtask-amounts        { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.subtask-quoted         { font-size: 11.5px; color: var(--text-soft); font-weight: 600; }
.subtask-spent          { font-size: 11.5px; font-weight: 700; padding: 2px 7px;
                          border-radius: 99px; }
.subtask-spent.under-budget { background: rgba(5,150,105,.12); color: #059669; }
.subtask-spent.over-budget  { background: rgba(220,38,38,.1);  color: #dc2626; }
.subtask-complete-btn   { padding: 3px 10px; font-size: 11.5px; flex-shrink: 0; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cal-legend { display: none; }
  .month-day  { min-height: 80px; }
}
@media (max-width: 680px) {
  .cal-title  { font-size: 20px; }
  .cal-header { gap: 12px; }
  .month-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; box-sizing: border-box; }
  .month-dow  { padding: 8px 2px; font-size: 10px; letter-spacing: 0; font-weight: 700; }
  .month-day  { min-height: 52px; aspect-ratio: auto; padding: 4px 3px 3px; min-width: 0; box-sizing: border-box; overflow: hidden; }
  .day-num    { font-size: 11px; width: 20px; height: 20px; margin-bottom: 2px; }
  .month-task { font-size: 9.5px; padding: 2px 4px; border-radius: 4px; line-height: 1.3; max-width: 100%; }
  .task-dot   { width: 5px; height: 5px; margin-right: 3px; }
  .month-more { font-size: 9px; padding: 1px 3px; margin-top: 1px; }
  .day-panel  { width: 100%; }
  .week-wrap  { overflow-x: auto; }
  .week-header, .week-allday, .week-body { min-width: 560px; }
}
@media (max-width: 420px) {
  .month-dow  { font-size: 8.5px; padding: 6px 1px; }
  .month-day  { min-height: 46px; padding: 3px 2px 2px; }
  .day-num    { font-size: 10px; width: 18px; height: 18px; margin-bottom: 1px; }
  .month-task { font-size: 8px; padding: 1px 3px; border-radius: 3px; }
  .task-dot   { width: 4px; height: 4px; margin-right: 2px; }
  .month-more { font-size: 8px; padding: 0 2px; }
}

