/* ─── IX Reports Hub — Styles not expressible in Tailwind ─── */
@import url("tokens.css");

/* ─── Cmdk trigger ─── */
.cmdk-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ix-surface-2);
  border: 1px solid var(--ix-border);
  border-radius: var(--ix-radius-sm);
  padding: 7px 14px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  color: var(--ix-muted);
  transition: all 0.15s;
  min-width: 200px;
}
.cmdk-trigger:hover { border-color: rgba(17,199,111,.45); color: var(--ix-ink); }
.cmdk-trigger .shortcut {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  background: var(--ix-surface-3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--ix-font-mono);
}

/* ─── Icon button ─── */
.icon-btn {
  background: var(--ix-surface-2);
  border: 1px solid var(--ix-border);
  border-radius: var(--ix-radius-sm);
  color: var(--ix-muted);
  padding: 7px 10px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { background: var(--ix-green-light); color: var(--ix-green-dark); }

/* ─── Sidebar nav items ─── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--ix-radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--ix-ink);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s;
}
.nav-item:hover { background: var(--ix-surface-2); }
.nav-item.active { background: var(--ix-green-light); color: var(--ix-green-dark); font-weight: 600; }
.nav-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; color: var(--ix-muted); }
.nav-item.active .nav-icon { color: var(--ix-green-dark); }
.nav-label { flex: 1; }
.nav-count {
  background: var(--ix-surface-3);
  color: var(--ix-muted);
  font-size: 12px;
  font-weight: 600;
  min-width: 26px;
  text-align: center;
  padding: 1px 7px;
  border-radius: var(--ix-radius-sm);
}
.nav-item.active .nav-count { background: var(--ix-green); color: #fff; }

/* ─── Active filters bar ─── */
.active-filters-bar {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--ix-muted);
  border-top: 1px solid var(--ix-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.active-filters-bar.hidden { display: none; }
.clear-filters-btn {
  font-size: 12px;
  color: var(--ix-green-dark);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

/* ─── View toggle ─── */
.view-toggle {
  display: flex;
  background: var(--ix-surface-2);
  border: 1px solid var(--ix-border);
  border-radius: var(--ix-radius-sm);
  overflow: hidden;
}
.view-toggle-btn {
  padding: 6px 12px;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ix-muted);
  font-family: inherit;
  transition: all 0.12s;
}
.view-toggle-btn.active { background: var(--ix-green); color: #fff; }
.view-toggle-btn:hover:not(.active) { color: var(--ix-ink); }

/* ─── Report rows ─── */
.reports-list { display: flex; flex-direction: column; gap: 12px; }
.reports-list.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.reports-list.grid-view .report-row {
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border-left: none;
  border-top: 3px solid transparent;
}
.reports-list.grid-view .report-row:hover {
  border-left-color: transparent !important;
  border-top-color: var(--ix-green);
  transform: translateY(-2px);
}
.reports-list.grid-view .rr-icon { font-size: 24px; width: auto; margin-bottom: 8px; }
.reports-list.grid-view .rr-info { width: 100%; }
.reports-list.grid-view .rr-title {
  white-space: normal;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reports-list.grid-view .rr-meta {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reports-list.grid-view .rr-tags { margin-top: 12px; padding-left: 0; }

.report-row {
  background: var(--ix-surface);
  border: 1px solid var(--ix-border);
  border-radius: var(--ix-radius-md);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  transition: all 0.18s;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid transparent;
  box-shadow: var(--ix-shadow-card);
}
.report-row:hover {
  box-shadow: var(--ix-shadow-md);
  transform: translateY(-1px);
  color: inherit;
}
.rr-icon { font-size: 20px; color: var(--ix-muted); width: 32px; text-align: center; flex-shrink: 0; }
.rr-info { flex: 1; min-width: 0; }
.rr-title { font-size: 15px; font-weight: 600; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-meta { font-size: 12px; color: var(--ix-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-owner { font-size: 11px; color: var(--ix-muted); font-weight: 500; margin-top: 1px; opacity: 0.75; }
.rr-tags { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; width: 100%; padding-left: 46px; margin-top: 3px; }
.rr-tag { font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.2px; }
.rr-tag-empresa { color: #fff; }
.rr-tag-projeto { background: var(--ix-green-light); color: var(--ix-green-dark); }
.rr-tag-area { background: var(--ix-surface-3); color: var(--ix-muted); }
.rr-tag-access { background: var(--ix-surface-3); color: var(--ix-muted); font-size: 9px; }
[data-theme="dark"] .rr-tag-empresa { opacity: 0.9; }
.rr-num { font-size: 11px; font-weight: 700; background: var(--ix-surface-3); color: var(--ix-muted); padding: 2px 8px; border-radius: 4px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.rr-pin { color: var(--ix-green); font-size: 12px; margin-left: 4px; }

/* ─── Pagination ─── */
.pagination { display: flex; justify-content: center; gap: 4px; list-style: none; padding: 0; }
.page-item .page-link {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: var(--ix-radius-sm);
  border: 1px solid var(--ix-border);
  background: var(--ix-surface);
  color: var(--ix-ink);
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: all 0.15s;
  font-family: inherit;
}
.page-item .page-link:hover { background: var(--ix-green-light); border-color: var(--ix-green); color: var(--ix-green-dark); }
.page-item.active .page-link { background: var(--ix-green); border-color: var(--ix-green); color: #fff; }
.page-item.disabled .page-link { opacity: 0.4; cursor: not-allowed; }
.page-item.ellipsis .page-link { border: none; background: none; cursor: default; color: var(--ix-muted); }

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ix-green);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--ix-radius-sm);
  font-size: 14px;
  font-weight: 600;
  z-index: var(--ix-z-toast);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ─── Visibility ─── */
.filter-hidden, .page-hidden, .hidden { display: none !important; }

/* ─── Mobile sidebar ─── */
.sidebar-open { transform: translateX(0) !important; }

@media (max-width: 768px) {
  .report-row { padding: 16px 14px; }
  .rr-tags { padding-left: 0; }
}
@media (max-width: 480px) {
  .report-row { padding: 14px 12px; }
}
