/* assets/css/dashboard.css */

.dash { padding: 18px 0 30px; display: grid; gap: 14px; }

.dash-hero {
  display: grid;
  gap: 12px;
  align-items: center;
}

.dash-hero h1 { margin: 0; font-size: 1.6rem; letter-spacing: .2px; }
.dash-hero p  { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }

.dash-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.dash-panel { overflow: hidden; }

.dash-top {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.dash-top h2 { margin: 0; font-size: 1.1rem; }

.dash-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,.02);
  font-weight: 700;
  font-size: .9rem;
}

.chip.active {
  border-color: rgba(45,199,255,.45);
  box-shadow: 0 0 0 3px rgba(45,199,255,.12);
}

.ticket-list {
  display: grid;
  gap: 10px;
}

.ticket-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,.02);
}

.ticket-card:hover {
  border-color: rgba(45,199,255,.35);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.ticket-num { font-weight: 800; }

.ticket-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.18);
  font-size: .85rem;
  font-weight: 800;
  color: var(--text);
}

.badge.vis.public { border-color: rgba(61,220,151,.35); }
.badge.vis.private { border-color: rgba(255,107,107,.25); }

.ticket-mid { display: grid; gap: 4px; }
.ticket-mod { color: var(--muted); font-weight: 800; font-size: .95rem; }
.ticket-sum { font-weight: 700; }

.ticket-bot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .85rem;
  flex-wrap: wrap;
}

.dash-empty {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
}

.dash-empty-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.18);
  font-size: 1.2rem;
}

.dash-empty-text h3 { margin: 0; font-size: 1.1rem; }
.dash-empty-text p { margin: 6px 0 0; color: var(--muted); max-width: 72ch; }

.dash-empty-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Use your global button styles. These only help if dashboard.css loads before them */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); text-decoration: none; color: var(--text); background: rgba(255,255,255,.02); font-weight: 800; }
.btn.primary { background: var(--primary); color: #000; border-color: transparent; }

/* Ticket list */
.ticket-list {
  display: grid;
  gap: 12px;
}

/* Card */
.ticket-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 10px 24px rgba(0,0,0,0.20);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ticket-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.055);
}

.ticket-card:focus-within {
  outline: 2px solid rgba(120, 180, 255, 0.35);
  outline-offset: 2px;
}

/* Top row */
.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ticket-id {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 1.02rem;
}

.ticket-badges {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
}

/* Badge variants (no crazy colors, just subtle cues) */
.badge--public  { border-color: rgba(80, 200, 140, 0.22); }
.badge--private { border-color: rgba(240, 160, 80, 0.22); }
.badge--locked  { border-color: rgba(255,255,255,0.16); opacity: 0.9; }

/* Content */
.ticket-mod {
  color: rgba(255,255,255,0.80);
  font-weight: 700;
  font-size: 0.95rem;
}

.ticket-summary {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.ticket-summary a {
  color: inherit;
  text-decoration: none;
}

.ticket-summary a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Meta row */
.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: rgba(255,255,255,0.62);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
}

.ticket-meta span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.ticket-card {
  color: inherit;
  text-decoration: none;
}

.ticket-card {
  position: relative;
  overflow: hidden;
}

.ticket-card {
  position: relative;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}

.ticket-card:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.06);
}

.ticket-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
}

.ticket-card.status-open::before         { background:#5ab4ff; }
.ticket-card.status-in_progress::before  { background:#ffc45a; }
.ticket-card.status-pending_info::before { background:#ffc45a; }
.ticket-card.status-testing::before      { background:#c48cff; }
.ticket-card.status-resolved::before     { background:#5adc8c; }
.ticket-card.status-released::before     { background:#5adc8c; }
.ticket-card.status-closed::before       { background:#aaa; }
.ticket-card.status-duplicate::before    { background:#ff9a9a; }
.ticket-card.status-wont_fix::before     { background:#ff9a9a; }

.ticket-id {
  font-weight: 800;
}

.ticket-mod {
  margin-top: 6px;
  font-weight: 700;
  opacity: 0.85;
}

.ticket-summary {
  font-size: 1.05rem;
  font-weight: 800;
  margin-top: 4px;
}

.ticket-meta {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: .85rem;
  opacity: .65;
}


/* Desktop: give it a little more breathing room */
@media (min-width: 900px) {
  .ticket-card { padding: 16px 18px; }
  .ticket-summary { font-size: 1.12rem; }
}


/* Desktop layout */
@media (min-width: 900px) {
  .dash-hero { grid-template-columns: 1fr auto; }
  .dash-top { grid-template-columns: 180px 1fr; align-items: center; }
  .dash-top h2 { margin: 0; }
}
