/* ============================================================
   iMND Dashboard — base styles
   Brand: ciano #05D2CE  ·  Fonte: Agrandir
   ============================================================ */

@font-face {
  font-family: 'Agrandir';
  src: url('../fonts/agrandir-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Agrandir';
  src: url('../fonts/agrandir-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand-50:  #E6FBFA;
  --brand-100: #C5F6F3;
  --brand-200: #8DEDE7;
  --brand-300: #5FE4E0;
  --brand-400: #23D5CF;
  --brand-500: #05D2CE;
  --brand-600: #03A8A5;
  --brand-700: #027D7B;
  --brand-800: #024A48;
  --brand-900: #012928;

  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  --status-idle:        #64748B;
  --status-design-biz:  #8B5CF6;
  --status-design-tech: #6366F1;
  --status-estimate:    #F59E0B;
  --status-running:     #2563EB;
  --status-test-tech:   #0EA5E9;
  --status-test-biz:    #06B6D4;
  --status-approved:    #16A34A;
  --status-paused:      #6B7280;
  --status-done:        #15803D;
  --status-canceled:    #9CA3AF;

  --bg:        #F4F7FB;
  --surface:   #FFFFFF;
  --border:    #E2E8F0;
  --text:      #0F172A;
  --text-soft: #475569;
}

[data-theme="dark"] {
  --bg:        #0B1220;
  --surface:   #111A2C;
  --border:    #1E293B;
  --text:      #E2E8F0;
  --text-soft: #94A3B8;

  --gray-50:  #1E293B;
  --gray-100: #1E293B;
  --gray-200: #334155;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Agrandir', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ----- Scrollbars ----- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #334155; }

/* ----- App shell ----- */
.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar .logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.sidebar .logo img { height: 64px; width: auto; }
.sidebar .logo .sub {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--text-soft);
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background .15s, color .15s;
  margin-bottom: 2px;
}
.sidebar nav a:hover {
  background: var(--gray-100);
  color: var(--text);
}
.sidebar nav a.active {
  background: var(--brand-50);
  color: var(--brand-700);
}
[data-theme="dark"] .sidebar nav a.active {
  background: rgba(5, 210, 206, 0.12);
  color: var(--brand-300);
}
.sidebar nav a svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar .section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-soft);
  padding: 14px 12px 6px;
  font-weight: 700;
}

.main-area { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.topbar .subtitle { font-size: 13px; color: var(--text-soft); font-weight: 500; }
.topbar .actions { display: flex; align-items: center; gap: 10px; }

.content { padding: 24px 28px 60px; max-width: 100%; }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: -260px;
    width: 248px;
    z-index: 50;
    transition: left .2s;
  }
  .sidebar.open { left: 0; }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  background: var(--gray-100);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--gray-200); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--brand-500);
  color: #04302F;
  border-color: var(--brand-500);
}
.btn-primary:hover { background: var(--brand-400); border-color: var(--brand-400); }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--gray-100); }
.btn-danger {
  background: #FEE2E2;
  color: #991B1B;
  border-color: #FCA5A5;
}
.btn-danger:hover { background: #FECACA; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { padding: 3px 6px; font-size: 11px; border-radius: 6px; }
.btn-icon { padding: 7px; }

/* ----- Inputs ----- */
.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(5,210,206,0.15);
}
.textarea { resize: vertical; min-height: 80px; }
.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ----- Cards ----- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-head h2 { font-size: 15px; margin: 0; font-weight: 700; letter-spacing: -0.005em; }
.card-head .hint { font-size: 12px; color: var(--text-soft); }

/* ----- KPI cards ----- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.kpi .label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.kpi .value { font-size: 26px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
/* Tooltips com "?" */
.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  margin-left: 5px;
  cursor: help;
  position: relative;
  vertical-align: middle;
}
.help-tip:hover { background: var(--brand-500); color: #04302F; }
.help-tip[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  line-height: 1.4;
  width: max-content;
  max-width: 280px;
  white-space: normal;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 100;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.help-tip[data-tip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text);
  opacity: 0;
  transition: opacity .15s;
  z-index: 100;
  pointer-events: none;
}
.help-tip:hover::after, .help-tip:hover::before { opacity: 1; }

.kpi .delta { font-size: 12px; font-weight: 600; margin-top: 6px; display: inline-flex; align-items: center; gap: 3px; }
.kpi .delta.up { color: #16A34A; }
.kpi .delta.down { color: #DC2626; }
.kpi .delta.neutral { color: var(--text-soft); }
.kpi .delta svg { width: 12px; height: 12px; }
.kpi .delta-context { color: var(--text-soft); font-weight: 500; margin-left: 2px; font-size: 11px; }
.kpi-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand-700);
}
[data-theme="dark"] .kpi-icon { background: rgba(5,210,206,0.12); color: var(--brand-300); }
.kpi-icon svg { width: 16px; height: 16px; }

/* ----- Badges (status, prioridade) ----- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: .8;
}
.badge-idle        { background: #F1F5F9; color: #475569; }
.badge-design-biz  { background: #EDE9FE; color: #5B21B6; }
.badge-design-tech { background: #E0E7FF; color: #3730A3; }
.badge-estimate    { background: #FEF3C7; color: #92400E; }
.badge-running     { background: #DBEAFE; color: #1E40AF; }
.badge-test-tech   { background: #E0F2FE; color: #0369A1; }
.badge-test-biz    { background: #CFFAFE; color: #0E7490; }
.badge-approved    { background: #D1FAE5; color: #065F46; }
.badge-paused      { background: #E5E7EB; color: #374151; }
.badge-done        { background: #DCFCE7; color: #166534; }
.badge-canceled    { background: #F3F4F6; color: #4B5563; }

.badge-pri-alta  { background: #FEE2E2; color: #991B1B; }
.badge-pri-media { background: #FEF3C7; color: #92400E; }
.badge-pri-baixa { background: #DCFCE7; color: #166534; }

[data-theme="dark"] .badge-idle        { background: rgba(100,116,139,0.15);  color: #CBD5E1; }
[data-theme="dark"] .badge-design-biz  { background: rgba(139,92,246,0.15);   color: #C4B5FD; }
[data-theme="dark"] .badge-design-tech { background: rgba(99,102,241,0.15);   color: #A5B4FC; }
[data-theme="dark"] .badge-estimate    { background: rgba(245,158,11,0.15);   color: #FCD34D; }
[data-theme="dark"] .badge-running     { background: rgba(59,130,246,0.15);   color: #93C5FD; }
[data-theme="dark"] .badge-test-tech   { background: rgba(14,165,233,0.15);   color: #7DD3FC; }
[data-theme="dark"] .badge-test-biz    { background: rgba(6,182,212,0.15);    color: #67E8F9; }
[data-theme="dark"] .badge-approved    { background: rgba(22,163,74,0.15);    color: #6EE7B7; }
[data-theme="dark"] .badge-paused      { background: rgba(107,114,128,0.2);   color: #D1D5DB; }
[data-theme="dark"] .badge-done        { background: rgba(34,197,94,0.15);    color: #86EFAC; }
[data-theme="dark"] .badge-canceled    { background: rgba(156,163,175,0.15);  color: #D1D5DB; }
[data-theme="dark"] .badge-pri-alta  { background: rgba(239,68,68,0.15);  color: #FCA5A5; }
[data-theme="dark"] .badge-pri-media { background: rgba(245,158,11,0.15); color: #FCD34D; }
[data-theme="dark"] .badge-pri-baixa { background: rgba(34,197,94,0.15);  color: #86EFAC; }

/* ----- Tables ----- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table thead th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-soft);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  background: var(--gray-50);
  position: sticky;
  top: 0;
}
.table thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color .15s, background .15s;
}
.table thead th.sortable:hover { color: var(--text); background: var(--gray-100); }
.table thead th.sortable::after {
  content: " ⇅";
  color: var(--gray-300);
  font-size: 10px;
  margin-left: 4px;
}
.table thead th.sort-asc::after  { content: " ▲"; color: var(--brand-700); }
.table thead th.sort-desc::after { content: " ▼"; color: var(--brand-700); }

/* Popover de colunas */
.col-popover {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  z-index: 50;
  min-width: 200px;
  display: none;
}
.col-popover.open { display: block; }
.col-popover .opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  cursor: pointer;
}
.col-popover .opt input { accent-color: var(--brand-500); }
.col-popover .opt label { cursor: pointer; flex: 1; }
.col-popover .pop-foot {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  text-align: right;
}
.table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}
.table tbody tr:hover { background: var(--gray-50); }
[data-theme="dark"] .table thead th { background: #0F1626; }
[data-theme="dark"] .table tbody tr:hover { background: rgba(255,255,255,0.025); }

/* ----- Progress bar ----- */
.progress {
  position: relative;
  width: 100%;
  height: 8px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  border-radius: 999px;
  transition: width .4s ease;
}
.progress.danger > span  { background: linear-gradient(90deg, #FCA5A5, #DC2626); }
.progress.warning > span { background: linear-gradient(90deg, #FCD34D, #D97706); }
.progress.success > span { background: linear-gradient(90deg, #86EFAC, #16A34A); }

/* ----- Charts container ----- */
.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.chart-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 960px) {
  .chart-grid, .chart-grid-3 { grid-template-columns: 1fr; }
}
.chart-box { position: relative; height: 280px; }

/* ----- Modal/Drawer ----- */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 100;
  display: none;
  animation: fadeIn .15s ease;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed;
  top: 0; right: -780px;
  width: 760px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  z-index: 101;
  box-shadow: -10px 0 40px rgba(0,0,0,0.12);
  transition: right .25s ease;
  display: flex;
  flex-direction: column;
}
.drawer.open { right: 0; }
.drawer-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.drawer-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.drawer-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ----- Tabs ----- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.tab {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand-700); border-bottom-color: var(--brand-500); }
[data-theme="dark"] .tab.active { color: var(--brand-300); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ----- Form helpers ----- */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.form-row { margin-bottom: 14px; }
@media (max-width: 700px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ----- Empty state ----- */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-soft);
}
.empty .ico {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--brand-50);
  color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .empty .ico { background: rgba(5,210,206,0.12); color: var(--brand-300); }
.empty .ico svg { width: 26px; height: 26px; }
.empty h3 { margin: 0 0 6px; font-size: 16px; color: var(--text); }
.empty p { margin: 0; font-size: 13.5px; max-width: 380px; margin-inline: auto; }

/* ----- Filters bar ----- */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filters-bar .search {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.filters-bar .search input {
  padding-left: 36px;
}
.filters-bar .search svg {
  position: absolute;
  left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-soft);
}

/* ----- Timeline (Gantt) ----- */
.gantt {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.gantt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.gantt-scroll { overflow-x: auto; }
.gantt-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-width: 920px;
}
.gantt-head-left, .gantt-head-right {
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.4px;
  padding: 10px 14px;
  position: sticky; top: 0;
  z-index: 2;
}
[data-theme="dark"] .gantt-head-left, [data-theme="dark"] .gantt-head-right { background: #0F1626; }
.gantt-head-right {
  display: grid;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.gantt-head-cell {
  padding: 10px 8px;
  border-left: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-soft);
  text-align: center;
}
.gantt-row-left {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.gantt-row-left .nm { font-weight: 600; line-height: 1.2; }
.gantt-row-left .meta { font-size: 11px; color: var(--text-soft); }
.gantt-row-right {
  position: relative;
  border-bottom: 1px solid var(--border);
  display: grid;
  min-height: 52px;
}
.gantt-row-right .grid-bg {
  position: absolute;
  inset: 0;
  display: grid;
  pointer-events: none;
}
.gantt-row-right .grid-bg > div {
  border-left: 1px solid var(--border);
  opacity: 0.45;
}
.gantt-bar {
  position: absolute;
  top: 10px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-500);
  color: #04302F;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding: 0 8px;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: transform .1s;
}
.gantt-bar:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.gantt-bar { cursor: grab; touch-action: none; }
.gantt-bar.dragging { cursor: grabbing; opacity: 0.92; box-shadow: 0 8px 20px rgba(0,0,0,0.18); }
.gantt-bar .gantt-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 7px;
  cursor: ew-resize;
  background: rgba(0,0,0,0.08);
  transition: background .15s;
  z-index: 2;
}
.gantt-bar .gantt-handle:hover { background: rgba(0,0,0,0.18); }
.gantt-bar .gantt-handle.left  { left: 0;  border-radius: 8px 0 0 8px; }
.gantt-bar .gantt-handle.right { right: 0; border-radius: 0 8px 8px 0; }
.gantt-bar.dragging .gantt-handle { background: rgba(0,0,0,0.22); }
.gantt-drag-tip {
  position: fixed;
  z-index: 9999;
  background: var(--text);
  color: white;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================================================
   Kanban (dentro do drawer de projeto)
   ============================================================ */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.kanban-col {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 240px;
  transition: background .15s;
}
[data-theme="dark"] .kanban-col { background: #0F1626; }
.kanban-col.drag-over { background: var(--brand-50); border-color: var(--brand-400); }
[data-theme="dark"] .kanban-col.drag-over { background: rgba(5,210,206,0.10); }
.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
}
.kanban-col-head .dot {
  width: 8px; height: 8px; border-radius: 999px; display: inline-block; margin-right: 6px;
}
.kanban-count {
  background: var(--gray-200);
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}
.kanban-cards { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  cursor: grab;
  font-size: 12.5px;
  transition: box-shadow .15s, transform .1s, border-color .15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kanban-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: var(--brand-300); }
.kanban-card.dragging { opacity: 0.5; transform: rotate(1deg); }
.kanban-card .tt { font-weight: 600; line-height: 1.3; word-break: break-word; }
.kanban-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  color: var(--text-soft);
  align-items: center;
}
.kanban-card .pri-dot {
  width: 7px; height: 7px; border-radius: 999px; display: inline-block;
}
.kanban-card .hours {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.kanban-add-btn {
  border: 1px dashed var(--border);
  background: transparent;
  border-radius: 8px;
  padding: 8px;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.kanban-add-btn:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-50); }
[data-theme="dark"] .kanban-add-btn:hover { background: rgba(5,210,206,0.10); color: var(--brand-300); }

/* Task modal — editor flutuante centralizado, sobrepõe o drawer */
.task-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .15s ease;
}
.task-modal {
  background: var(--surface);
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: modalIn .18s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.task-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.task-modal-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.task-modal-head .badge {
  margin-left: 8px;
}
.task-modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.task-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--gray-50);
  gap: 8px;
}
[data-theme="dark"] .task-modal-foot { background: #0F1626; }
.task-modal-foot .actions-right {
  display: flex;
  gap: 8px;
}

@media (max-width: 700px) {
  .kanban { grid-template-columns: 1fr; }
}
.gantt-bar .progress-overlay {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(0,0,0,0.18);
  border-radius: 8px 0 0 8px;
  pointer-events: none;
}
.gantt-bar.s-running   { background: #93C5FD; color: #1E3A8A; }
.gantt-bar.s-done      { background: #86EFAC; color: #14532D; }
.gantt-bar.s-risk      { background: #FCD34D; color: #78350F; }
.gantt-bar.s-late      { background: #FCA5A5; color: #7F1D1D; }
.gantt-bar.s-paused    { background: #D1D5DB; color: #374151; }
.gantt-bar.s-canceled  { background: #E5E7EB; color: #4B5563; text-decoration: line-through; }
.gantt-bar.s-idle      { background: #CBD5E1; color: #1E293B; }

.gantt-forecast-marker {
  position: absolute;
  top: 6px;
  height: 36px;
  width: 2px;
  background: #DC2626;
  z-index: 3;
  pointer-events: none;
}
.gantt-forecast-marker::after {
  content: attr(data-label);
  position: absolute;
  top: -2px;
  left: 4px;
  background: #DC2626;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.4px;
}
.gantt-forecast-marker.early { background: #16A34A; }
.gantt-forecast-marker.early::after { background: #16A34A; }

.gantt-today-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--brand-600);
  z-index: 1;
  pointer-events: none;
}
.gantt-today-line::after {
  content: "Hoje";
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-600);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* ----- Risks/milestones list inside drawer ----- */
.item-list { display: flex; flex-direction: column; gap: 8px; }
.item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--gray-50);
}
[data-theme="dark"] .item-row { background: #0F1626; }
.item-row .grow { flex: 1; min-width: 0; }
.item-row .tt { font-weight: 600; font-size: 13px; }
.item-row .mt { font-size: 11.5px; color: var(--text-soft); }

/* ----- Toast ----- */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--text);
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: slideIn .2s ease;
}
.toast.success { background: #15803D; }
.toast.error { background: #B91C1C; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ----- Misc helpers ----- */
.muted { color: var(--text-soft); }
.row-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* ============================================================
   Modo "personalizar dashboard"
   ============================================================ */
.customize-active {
  background: var(--brand-50);
  color: var(--brand-700);
  border-color: var(--brand-400);
}
[data-theme="dark"] .customize-active {
  background: rgba(5,210,206,0.12);
  color: var(--brand-300);
}
body.customizing .kpi,
body.customizing .card[data-widget] {
  position: relative;
  outline: 2px dashed var(--brand-400);
  outline-offset: 2px;
}
body.customizing [data-widget] { cursor: grab; }
body.customizing [data-widget].drag-source { opacity: 0.4; }
body.customizing [data-widget].drag-over { outline-color: var(--brand-500); outline-style: solid; outline-width: 3px; }
body.customizing .widget-toggle {
  position: absolute;
  top: 6px; right: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  color: var(--text-soft);
  transition: color .15s, background .15s;
}
body.customizing .widget-toggle:hover {
  color: #DC2626;
  background: #FEE2E2;
}
body.customizing .widget-toggle.is-hidden {
  color: var(--brand-700);
  background: var(--brand-50);
}
body.customizing .widget-toggle svg { width: 12px; height: 12px; }
.widget-hidden { display: none !important; }
body.customizing .widget-hidden {
  display: block !important;
  opacity: 0.35;
  filter: grayscale(1);
}
.customize-banner {
  background: var(--brand-50);
  border: 1px solid var(--brand-300);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
[data-theme="dark"] .customize-banner {
  background: rgba(5,210,206,0.10);
  border-color: var(--brand-600);
}

/* ============================================================
   Filtros salvos (chips na barra de filtros)
   ============================================================ */
.saved-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.saved-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
  font-weight: 600;
}
.saved-filter-chip:hover {
  border-color: var(--brand-400);
  background: var(--brand-50);
  color: var(--brand-700);
}
[data-theme="dark"] .saved-filter-chip:hover { background: rgba(5,210,206,0.12); color: var(--brand-300); }
.saved-filter-chip .del {
  display: inline-flex;
  width: 14px; height: 14px;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  border-radius: 50%;
}
.saved-filter-chip .del:hover { background: rgba(0,0,0,0.1); color: #DC2626; }

/* ============================================================
   Tour guiado
   ============================================================ */
.tour-overlay {
  position: fixed; inset: 0;
  z-index: 5000;
  pointer-events: none;
}
.tour-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.7);
  pointer-events: auto;
}
.tour-highlight {
  position: absolute;
  border: 3px solid var(--brand-500);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(15,23,42,0.7);
  pointer-events: none;
  transition: all .25s ease;
}
.tour-card {
  position: absolute;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 18px;
  max-width: 320px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  pointer-events: auto;
  z-index: 1;
}
.tour-card h4 { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.tour-card p { margin: 0 0 10px; font-size: 13px; color: var(--text-soft); line-height: 1.45; }
.tour-card .tour-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.tour-card .tour-step {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: 0.4px;
}
.tour-card .tour-actions { display: flex; gap: 6px; }

/* ============================================================
   Keyboard shortcut help modal
   ============================================================ */
.kbd-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 250;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .15s ease;
}
.kbd-modal {
  background: var(--surface);
  border-radius: 14px;
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 32px);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: modalIn .18s ease;
}
.kbd-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.kbd-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.kbd-body { padding: 18px; overflow-y: auto; }
.kbd-section { margin-bottom: 16px; }
.kbd-section h4 {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-soft);
  font-weight: 700;
}
.kbd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.kbd-keys { display: inline-flex; gap: 4px; }
.kbd-key {
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 7px;
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  min-width: 22px;
  text-align: center;
}
[data-theme="dark"] .kbd-key { background: #0F1626; }

.kbd-hint {
  position: fixed;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: fadeIn .15s;
}

/* ============================================================
   Comentários (drawer de projeto)
   ============================================================ */
.cmt-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cmt-item {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
[data-theme="dark"] .cmt-item { background: #0F1626; }
.cmt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.cmt-author {
  font-weight: 700;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cmt-avatar {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--brand-500);
  color: #04302F;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
}
.cmt-when { font-size: 11px; color: var(--text-soft); }
.cmt-body {
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.cmt-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.cmt-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.cmt-form .row-flex { justify-content: space-between; }

/* ============================================================
   Anexos
   ============================================================ */
.attach-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.attach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
}
[data-theme="dark"] .attach-item { background: #0F1626; }
.attach-item .attach-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--brand-50);
  color: var(--brand-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
[data-theme="dark"] .attach-item .attach-icon { background: rgba(5,210,206,0.12); color: var(--brand-300); }
.attach-item .attach-icon svg { width: 14px; height: 14px; }
.attach-item .grow { min-width: 0; flex: 1; }
.attach-item .tt { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-item .mt { font-size: 11px; color: var(--text-soft); }
.attach-item a.tt { color: inherit; text-decoration: none; }
.attach-item a.tt:hover { color: var(--brand-700); }

/* ============================================================
   Anexos inline — grid de cards em Dados Gerais
   ============================================================ */
.info-att-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 40px;
  border-radius: 8px;
  transition: background 0.15s, border 0.15s;
}
.info-att-grid.att-drag-over {
  background: rgba(5,210,206,0.06);
  outline: 2px dashed var(--brand-500);
  outline-offset: 2px;
}
.info-att-empty {
  font-size: 12px;
  color: var(--text-soft);
  padding: 6px 2px;
  margin: 0;
}
.att-card {
  width: 130px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.att-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.10);
  border-color: var(--brand-400);
}
.att-card-preview {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.att-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.att-card:hover .att-card-thumb { transform: scale(1.04); }
.att-card-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-soft);
  opacity: 0.65;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.att-card-icon-wrap svg { width: 28px; height: 28px; }
.att-card-pdf  { color: #DC2626; opacity: 1; }
.att-card-link { color: #2563EB; opacity: 1; }
.att-card-footer {
  padding: 6px 8px 5px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.att-card-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.att-card-meta {
  font-size: 10px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.att-card-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  margin-top: 2px;
}
.att-card-actions .btn-xs {
  padding: 2px 4px;
  min-width: 0;
}
.att-card-actions .btn-xs svg { width: 12px; height: 12px; }

/* ============================================================
   Lightbox / pré-visualização de anexo
   ============================================================ */
.att-prev-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.att-prev-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(3px);
}
.att-prev-dialog {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: 12px;
  max-width: 92vw;
  max-height: 92vh;
  width: min(860px, 92vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.att-prev-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.att-prev-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.att-prev-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
  min-height: 200px;
}
.att-prev-img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}
.att-prev-frame {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: 6px;
}
.att-prev-link, .att-prev-other {
  text-align: center;
  color: var(--text-soft);
}
.att-prev-link .ico, .att-prev-other .ico { margin: 0 auto 12px; color: var(--brand-500); }
.att-prev-link .ico svg, .att-prev-other .ico svg { width: 48px; height: 48px; }
.att-prev-link a { color: var(--brand-600); word-break: break-all; }

[data-theme="dark"] .att-card { background: #111827; border-color: #1E293B; }
[data-theme="dark"] .att-card-preview { background: #0D1220; }
[data-theme="dark"] .att-prev-dialog { background: #111827; }
[data-theme="dark"] .att-prev-body { background: #0D1220; }

/* ============================================================
   Checklist (sub-tarefas no modal Kanban)
   ============================================================ */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 12.5px;
  transition: background .12s;
}
.checklist-item:hover { background: var(--gray-50); }
[data-theme="dark"] .checklist-item:hover { background: #0F1626; }
.checklist-item input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--brand-500);
}
.checklist-item input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--text);
  padding: 2px 0;
  font-family: inherit;
}
.checklist-item input[type="text"]:focus { outline: none; }
.checklist-item.done input[type="text"] { text-decoration: line-through; color: var(--text-soft); }
.checklist-item .cl-del {
  background: transparent;
  border: none;
  color: var(--text-soft);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity .12s, color .12s;
}
.checklist-item:hover .cl-del { opacity: 1; }
.checklist-item .cl-del:hover { color: #DC2626; }
.checklist-add {
  display: flex;
  gap: 6px;
  padding: 4px 6px;
}
.checklist-add input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
  background: var(--surface);
  color: var(--text);
}
.checklist-add input:focus { outline: none; border-color: var(--brand-500); }
.checklist-progress {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 600;
  margin-top: 3px;
}

/* ============================================================
   Forecast card (drawer de projeto)
   ============================================================ */
.forecast-card {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
[data-theme="dark"] .forecast-card { background: #0F1626; }
.forecast-card .fc-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.forecast-card .fc-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
}
.forecast-card .fc-value {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}
.forecast-card .fc-value.late { color: #DC2626; }
.forecast-card .fc-value.early { color: #16A34A; }
.forecast-card .fc-note { font-size: 11px; color: var(--text-soft); }
.forecast-card .conf {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  display: inline-flex;
  width: max-content;
  margin-top: 3px;
}
.forecast-card .conf.high   { background: #DCFCE7; color: #166534; }
.forecast-card .conf.medium { background: #FEF3C7; color: #92400E; }
.forecast-card .conf.low    { background: #FEE2E2; color: #991B1B; }
.forecast-card .conf.unknown { background: #E5E7EB; color: #374151; }
@media (max-width: 700px) { .forecast-card { grid-template-columns: 1fr; } }

.burndown-box {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface);
}
.burndown-box h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
}
.burndown-canvas-wrap { position: relative; height: 220px; }

/* ============================================================
   Alert banner (Dashboard)
   ============================================================ */
.alert-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-500);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.alert-banner.has-high { border-left-color: #DC2626; }
.alert-banner.has-medium { border-left-color: #F59E0B; }
.alert-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.alert-banner-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-banner-head h2 svg { width: 16px; height: 16px; }
.alert-banner-head .count {
  background: var(--gray-100);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--text-soft);
}
.alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
}
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s, border-color .15s;
  text-decoration: none;
  color: var(--text);
}
.alert-item:hover {
  border-color: var(--brand-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
[data-theme="dark"] .alert-item { background: #0F1626; }
.alert-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.alert-icon svg { width: 14px; height: 14px; }
.alert-icon.sev-high   { background: #FEE2E2; color: #991B1B; }
.alert-icon.sev-medium { background: #FEF3C7; color: #92400E; }
.alert-icon.sev-low    { background: #DBEAFE; color: #1E40AF; }
[data-theme="dark"] .alert-icon.sev-high   { background: rgba(220,38,38,0.18); color: #FCA5A5; }
[data-theme="dark"] .alert-icon.sev-medium { background: rgba(245,158,11,0.18); color: #FCD34D; }
[data-theme="dark"] .alert-icon.sev-low    { background: rgba(37,99,235,0.18); color: #93C5FD; }
.alert-text { min-width: 0; flex: 1; }
.alert-text .tt {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alert-text .ms { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

/* ============================================================
   Calendário mensal
   ============================================================ */
.cal-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}
.cal-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  text-transform: capitalize;
}
.cal-nav { display: flex; gap: 6px; align-items: center; }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .cal-weekdays { background: #0F1626; }
.cal-weekdays > div {
  padding: 8px;
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: var(--text-soft);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(108px, 1fr);
}
.cal-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 6px 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 108px;
  overflow: hidden;
  background: var(--surface);
}
.cal-cell.out-of-month { background: var(--gray-50); opacity: 0.55; }
[data-theme="dark"] .cal-cell.out-of-month { background: #0B1220; }
.cal-cell.today .day-num {
  background: var(--brand-500);
  color: #04302F;
}
.cal-cell .day-num {
  align-self: flex-start;
  font-weight: 700;
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 6px;
}
.cal-evt {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border-left: 3px solid transparent;
  background: var(--gray-100);
  color: var(--text);
  text-decoration: none;
  display: block;
}
[data-theme="dark"] .cal-evt { background: #1E293B; }
.cal-evt:hover { box-shadow: 0 0 0 1px var(--brand-400) inset; }
.cal-evt.k-start        { background: #DBEAFE; color: #1E40AF; border-left-color: #2563EB; }
.cal-evt.k-end-forecast { background: #FEF3C7; color: #92400E; border-left-color: #F59E0B; }
.cal-evt.k-end-actual   { background: #DCFCE7; color: #166534; border-left-color: #16A34A; }
.cal-evt.k-milestone    { background: #FCE7F3; color: #9D174D; border-left-color: #DB2777; }
.cal-evt.k-task         { background: #E0E7FF; color: #3730A3; border-left-color: #6366F1; }
[data-theme="dark"] .cal-evt.k-start        { background: rgba(37,99,235,0.18);  color: #93C5FD; }
[data-theme="dark"] .cal-evt.k-end-forecast { background: rgba(245,158,11,0.18); color: #FCD34D; }
[data-theme="dark"] .cal-evt.k-end-actual   { background: rgba(34,197,94,0.18);  color: #86EFAC; }
[data-theme="dark"] .cal-evt.k-milestone    { background: rgba(219,39,119,0.18); color: #F9A8D4; }
[data-theme="dark"] .cal-evt.k-task         { background: rgba(99,102,241,0.18); color: #C7D2FE; }
.cal-more {
  font-size: 10.5px;
  color: var(--text-soft);
  padding: 1px 6px;
  font-weight: 600;
}
.cal-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--gray-50);
  font-size: 12px;
}
[data-theme="dark"] .cal-legend { background: #0F1626; }
.cal-legend .leg { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .swatch { width: 12px; height: 12px; border-radius: 3px; }

/* ============================================================
   Histórico de alterações
   ============================================================ */
.audit-list {
  display: flex;
  flex-direction: column;
}
.audit-row {
  display: grid;
  grid-template-columns: 160px 130px 1fr;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: center;
}
.audit-row:hover { background: var(--gray-50); }
[data-theme="dark"] .audit-row:hover { background: rgba(255,255,255,0.02); }
.audit-when { color: var(--text-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.audit-action {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  width: max-content;
}
.audit-action.a-create   { background: #DCFCE7; color: #166534; }
.audit-action.a-update   { background: #DBEAFE; color: #1E40AF; }
.audit-action.a-delete   { background: #FEE2E2; color: #991B1B; }
.audit-action.a-dup      { background: #E0E7FF; color: #3730A3; }
.audit-action.a-backup   { background: #FEF3C7; color: #92400E; }
[data-theme="dark"] .audit-action.a-create  { background: rgba(34,197,94,0.18);  color: #86EFAC; }
[data-theme="dark"] .audit-action.a-update  { background: rgba(37,99,235,0.18);  color: #93C5FD; }
[data-theme="dark"] .audit-action.a-delete  { background: rgba(220,38,38,0.18);  color: #FCA5A5; }
[data-theme="dark"] .audit-action.a-dup     { background: rgba(99,102,241,0.18); color: #C7D2FE; }
[data-theme="dark"] .audit-action.a-backup  { background: rgba(245,158,11,0.18); color: #FCD34D; }

@media (max-width: 760px) {
  .audit-row { grid-template-columns: 1fr; gap: 4px; }
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--gray-100);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-soft);
}
.section-title-2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-soft);
  margin: 18px 0 8px;
}

/* ============================================================
   Página de validação (landing page para validadores externos)
   ============================================================ */
.val-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.val-hero {
  background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-500) 100%);
  color: #04302F;
  border-radius: 16px;
  padding: 36px 32px;
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
  box-shadow: 0 20px 60px rgba(3,168,165,0.15);
}
.val-hero img { height: 72px; width: auto; flex-shrink: 0; background: white; padding: 12px 20px; border-radius: 14px; }
.val-hero .grow { flex: 1; min-width: 280px; }
.val-hero h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  color: white;
  letter-spacing: -0.01em;
}
.val-hero .lede {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,0.92);
  max-width: 620px;
  margin: 8px 0 16px;
}
.val-hero .meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.val-hero .meta span::before { content: "•"; margin-right: 6px; opacity: 0.6; }
.val-hero .meta span:first-child::before { content: none; }
.val-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.val-hero .btn-hero {
  background: white;
  color: var(--brand-700);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 10px;
  border: 0;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .15s, box-shadow .15s;
}
.val-hero .btn-hero:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(0,0,0,0.18); }
.val-hero .btn-hero-outline {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.6);
}
.val-hero .btn-hero-outline:hover { background: rgba(255,255,255,0.12); box-shadow: none; }

.val-section { margin-bottom: 36px; }
.val-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.val-section h2 .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: var(--brand-500);
  color: #04302F;
  font-size: 14px;
  font-weight: 800;
  border-radius: 50%;
}
.val-section > p.intro {
  color: var(--text-soft);
  font-size: 14px;
  margin: 0 0 16px;
  max-width: 760px;
  line-height: 1.5;
}

/* Cards explicativos */
.val-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.val-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.val-card .ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
[data-theme="dark"] .val-card .ico { background: rgba(5,210,206,0.12); color: var(--brand-300); }
.val-card .ico svg { width: 20px; height: 20px; }
.val-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.val-card p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-soft); }

/* Roteiro (checklist) */
.scenario-list { display: flex; flex-direction: column; gap: 10px; }
.scenario {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color .15s, background .15s;
}
.scenario.done {
  background: rgba(34,197,94,0.05);
  border-color: rgba(34,197,94,0.4);
}
[data-theme="dark"] .scenario.done { background: rgba(34,197,94,0.10); }
.scenario .num-cell {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.scenario.done .num-cell {
  background: #16A34A;
  color: white;
}
.scenario .grow { flex: 1; min-width: 0; }
.scenario h4 { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; }
.scenario p { margin: 0 0 4px; font-size: 13px; color: var(--text-soft); line-height: 1.5; }
.scenario ol { margin: 6px 0 8px; padding-left: 20px; font-size: 12.5px; color: var(--text-soft); line-height: 1.55; }
.scenario ol li { margin-bottom: 2px; }
.scenario .expected {
  background: var(--brand-50);
  border-left: 3px solid var(--brand-500);
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--brand-700);
  margin-top: 8px;
}
[data-theme="dark"] .scenario .expected { background: rgba(5,210,206,0.10); color: var(--brand-300); }
.scenario .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-direction: column;
}
.scenario .go-btn {
  background: var(--brand-500);
  color: #04302F;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
.scenario .check-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-soft);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.scenario.done .check-btn {
  background: #16A34A;
  border-color: #16A34A;
  color: white;
}

/* Progress bar do roteiro */
.val-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.val-progress .label { font-size: 13px; font-weight: 700; }
.val-progress .bar { flex: 1; }
.val-progress .reset-btn { font-size: 11.5px; }

/* Feedback */
.val-feedback {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
}
.val-feedback h2 { margin-top: 0; }
.val-stars {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.val-star {
  background: transparent;
  border: 0;
  font-size: 26px;
  cursor: pointer;
  color: var(--gray-300);
  transition: color .12s, transform .1s;
  padding: 0 2px;
}
.val-star:hover, .val-star.active { color: #F59E0B; transform: scale(1.1); }

.val-feedback textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  resize: vertical;
}
.val-feedback textarea:focus { outline: none; border-color: var(--brand-500); }
.val-feedback .row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* Funcionalidades grid */
.val-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.val-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
.val-feature:hover { border-color: var(--brand-400); transform: translateY(-1px); }
.val-feature .ico {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
[data-theme="dark"] .val-feature .ico { background: rgba(5,210,206,0.12); color: var(--brand-300); }
.val-feature .ico svg { width: 16px; height: 16px; }
.val-feature h4 { margin: 0 0 2px; font-size: 13.5px; font-weight: 700; }
.val-feature p { margin: 0; font-size: 12px; color: var(--text-soft); line-height: 1.4; }

.val-disclaimer {
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
  margin-top: 40px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .val-grid-3 { grid-template-columns: 1fr; }
  .val-hero { padding: 24px 20px; }
  .val-hero h1 { font-size: 22px; }
  .scenario { flex-direction: column; }
  .scenario .actions { flex-direction: row; }
}

/* Print: relatórios */
@media print {
  .sidebar, .topbar .actions, .filters-bar, .no-print { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; }
  .card { break-inside: avoid; box-shadow: none; border-color: #ddd; }
  body { background: white; }
}

/* ─────────────────────────────────────────────
   Login page — segue o design system (variáveis CSS)
   ───────────────────────────────────────────── */
.login-page { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; background:var(--bg); padding:20px; }
.login-card { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:36px 40px; width:100%; max-width:420px; box-shadow:0 4px 24px rgba(0,0,0,.08); }
[data-theme="dark"] .login-card { box-shadow:0 20px 60px rgba(0,0,0,.5); }
.login-brand { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; margin-bottom:28px; padding-bottom:24px; border-bottom:1px solid var(--border); }
.login-logo { height:72px; width:auto; object-fit:contain; }
.login-tagline { font-size:11px; letter-spacing:1.4px; color:var(--text-soft); text-transform:uppercase; font-weight:700; text-align:center; }
.login-title { font-size:17px; font-weight:700; color:var(--text); margin:0 0 18px; }
.login-sub { font-size:13px; color:var(--text-soft); margin:-10px 0 16px; }
.login-btn { width:100%; padding:11px; font-size:14px; font-weight:600; background:var(--brand-500); color:#04302F; border-radius:8px; cursor:pointer; margin-top:6px; border:none; font-family:'Agrandir','Inter',system-ui,sans-serif; transition:background .15s; }
.login-btn:hover { background:var(--brand-400); }
.login-btn:disabled { opacity:.6; cursor:not-allowed; }
.login-error { background:rgba(239,68,68,.12); color:#DC2626; border:1px solid rgba(239,68,68,.25); border-radius:8px; padding:10px 14px; font-size:13px; margin-bottom:14px; display:none; }
[data-theme="dark"] .login-error { color:#FCA5A5; background:rgba(239,68,68,.15); border-color:rgba(239,68,68,.3); }
.login-success { background:rgba(34,197,94,.12); color:#16A34A; border:1px solid rgba(34,197,94,.25); border-radius:8px; padding:10px 14px; font-size:13px; margin-bottom:14px; display:none; }
[data-theme="dark"] .login-success { color:#6EE7B7; background:rgba(34,197,94,.15); border-color:rgba(34,197,94,.3); }
.btn-link-login { display:block; width:100%; text-align:center; background:none; border:none; color:var(--brand-600); font-size:13px; cursor:pointer; padding:10px; margin-top:6px; font-family:'Agrandir','Inter',system-ui,sans-serif; }
.btn-link-login:hover { text-decoration:underline; color:var(--brand-500); }
.login-footer-txt { font-size:12px; color:var(--text-soft); margin-top:20px; text-align:center; }
.pw-wrap { position:relative; }
.pw-wrap .input { padding-right:40px; }
.pw-toggle { position:absolute; right:10px; top:50%; transform:translateY(-50%); background:none; border:none; cursor:pointer; color:var(--text-soft); padding:4px; display:flex; }
.pw-toggle:hover { color:var(--brand-500); }
.pw-toggle svg { width:16px; height:16px; }

/* ─────────────────────────────────────────────
   Collaborator read-only mode
   ───────────────────────────────────────────── */
.role-colaborador .edit-only { display:none !important; }
.role-colaborador .drawer-body input:not([type="hidden"]),
.role-colaborador .drawer-body select,
.role-colaborador .drawer-body textarea:not(#cmt-body) { pointer-events:none; opacity:.75; cursor:default; background:var(--bg) !important; }
.role-colaborador .tabs button { pointer-events:auto; opacity:1; }
.collab-banner { background:rgba(5,210,206,.1); border:1px solid rgba(5,210,206,.3); border-radius:8px; padding:8px 14px; font-size:13px; color:var(--brand-600); display:flex; align-items:center; gap:8px; margin-bottom:14px; }
.collab-banner svg { width:15px; height:15px; flex-shrink:0; }

/* ─────────────────────────────────────────────
   Sidebar user info
   ───────────────────────────────────────────── */
.sidebar-user { display:flex; align-items:center; gap:8px; padding:10px 12px; border-top:1px solid var(--border); margin-top:auto; }
.sidebar-user-avatar { width:30px; height:30px; border-radius:50%; background:var(--brand-500); color:#0F172A; font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.sidebar-user-details { flex:1; min-width:0; }
.sidebar-user-name { font-size:12px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-user-role { font-size:10px; color:var(--text-soft); }
.sidebar-logout svg { width:15px; height:15px; }

/* ─────────────────────────────────────────────
   Progress auto display
   ───────────────────────────────────────────── */
.progress-auto-display { display:flex; align-items:center; gap:10px; padding:8px 0; }
.progress-auto-bar { flex:1; height:8px; background:var(--bg); border-radius:99px; overflow:hidden; border:1px solid var(--border); }
.progress-auto-fill { height:100%; border-radius:99px; transition:width .3s, background .3s; }
.progress-auto-pct { font-size:14px; font-weight:700; min-width:38px; text-align:right; color:var(--text); }

/* ─────────────────────────────────────────────
   User management table
   ───────────────────────────────────────────── */
.users-table { width:100%; border-collapse:collapse; font-size:13px; margin-top:12px; }
.users-table th { text-align:left; font-weight:600; color:var(--text-soft); padding:8px 10px; border-bottom:2px solid var(--border); font-size:11px; text-transform:uppercase; letter-spacing:.05em; }
.users-table td { padding:10px; border-bottom:1px solid var(--border); color:var(--text); vertical-align:middle; }
.users-table tr:last-child td { border-bottom:none; }
.users-table tr:hover td { background:var(--bg); }
.user-inactive td { opacity:.5; }

/* ─────────────────────────────────────────────
   User modal
   ───────────────────────────────────────────── */
.user-modal-overlay { position:fixed; inset:0; z-index:8000; display:flex; align-items:center; justify-content:center; }
.user-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.6); }
.user-modal { position:relative; z-index:1; background:var(--surface); border-radius:14px; padding:28px 30px; width:100%; max-width:460px; box-shadow:0 16px 48px rgba(0,0,0,.25); border:1px solid var(--border); }
.user-modal h3 { margin:0 0 20px; font-size:16px; }
.temp-pw-box { display:flex; align-items:center; gap:8px; background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:10px 12px; font-family:monospace; font-size:14px; font-weight:700; letter-spacing:.05em; color:var(--brand-600); }
.temp-pw-box button { margin-left:auto; }
