/* ============================================================
   GTi ERP — Portal do Programador
   Paleta: Azul elétrico GTi + Preto profundo
   ============================================================ */

/* --- Variáveis -------------------------------------------- */
:root {
  --gti-blue:        #2879E8;
  --gti-blue-light:  #4BAAFF;
  --gti-blue-dark:   #0D3B7A;
  --gti-blue-glow:   rgba(40, 121, 232, 0.35);
  --gti-black:       #0A0A0F;
  --gti-card:        #0F172A;
  --gti-card-hover:  #1A2540;
  --gti-border:      #1E2D42;
  --gti-text:        #E2EAF4;
  --gti-text-muted:  #7B92B2;
  --gti-sidebar-w:   260px;
  --radius:          12px;
  --transition:      0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset / Base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--gti-black);
  color: var(--gti-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gti-blue-light); text-decoration: none; }
a:hover { color: #fff; }

/* ============================================================
   LAYOUT: Sidebar + Main
   ============================================================ */
.portal-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar ---------------------------------------------- */
.sidebar {
  width: var(--gti-sidebar-w);
  background: linear-gradient(180deg, #090912 0%, #0C1526 100%);
  border-right: 1px solid var(--gti-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--gti-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gti-blue-dark) 0%, var(--gti-blue) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--gti-blue-glow);
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
}

.sidebar-logo .logo-text {
  line-height: 1.2;
}

.sidebar-logo .logo-text strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--gti-blue-light), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-logo .logo-text span {
  font-size: 0.72rem;
  color: var(--gti-text-muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Nav links */
.sidebar-nav {
  padding: 20px 16px;
  flex: 1;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--gti-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 4px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(40, 121, 232, 0.12);
  color: var(--gti-blue-light);
}

.sidebar-nav a .nav-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

/* User section */
.sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--gti-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user .user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gti-blue-dark), var(--gti-blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-user .user-info strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gti-text);
}

.sidebar-user .user-info span {
  font-size: 0.72rem;
  color: var(--gti-text-muted);
}

.logout-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--gti-text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.logout-btn:hover { color: #ef4444; }

/* --- Main Content ----------------------------------------- */
.main-content {
  margin-left: var(--gti-sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  padding: 32px 40px 0;
  border-bottom: 1px solid var(--gti-border);
  padding-bottom: 24px;
  margin-bottom: 32px;
  background: linear-gradient(180deg, rgba(40,121,232,0.04) 0%, transparent 100%);
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--gti-text-muted);
  font-size: 0.9rem;
}

.page-body {
  padding: 0 40px 40px;
}

/* ============================================================
   CARDS DE PROJETO
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.project-card {
  background: var(--gti-card);
  border: 1px solid var(--gti-border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gti-blue), var(--gti-blue-light));
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover {
  border-color: rgba(40, 121, 232, 0.5);
  background: var(--gti-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(40, 121, 232, 0.18);
  color: inherit;
}

.project-card:hover::before { opacity: 1; }

.card-client {
  font-size: 0.75rem;
  color: var(--gti-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.4;
}

.card-stack {
  font-size: 0.8rem;
  color: var(--gti-text-muted);
  margin-bottom: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-updated {
  font-size: 0.75rem;
  color: var(--gti-text-muted);
}

/* ============================================================
   BADGES DE FASE
   ============================================================ */
.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Cores por fase */
.phase-discovery    { background: rgba(99,102,241,.15); color: #818cf8; border: 1px solid rgba(99,102,241,.3); }
.phase-ui_ux        { background: rgba(236,72,153,.15); color: #f472b6; border: 1px solid rgba(236,72,153,.3); }
.phase-setup        { background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.phase-backend      { background: rgba(40,121,232,.15); color: #60a5fa; border: 1px solid rgba(40,121,232,.3); }
.phase-frontend     { background: rgba(20,184,166,.15); color: #2dd4bf; border: 1px solid rgba(20,184,166,.3); }
.phase-qa           { background: rgba(249,115,22,.15); color: #fb923c; border: 1px solid rgba(249,115,22,.3); }
.phase-uat          { background: rgba(168,85,247,.15); color: #c084fc; border: 1px solid rgba(168,85,247,.3); }
.phase-adjustments  { background: rgba(239,68,68,.15);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }
.phase-deploy       { background: rgba(34,197,94,.15);  color: #4ade80; border: 1px solid rgba(34,197,94,.3); }
.phase-maintenance  { background: rgba(107,114,128,.15); color: #9ca3af; border: 1px solid rgba(107,114,128,.3); }

/* ============================================================
   FILTROS DE FASE (Pills)
   ============================================================ */
.phase-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--gti-border);
  color: var(--gti-text-muted);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--gti-blue);
  border-color: var(--gti-blue);
  color: #fff;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
}

.stat-item {
  background: var(--gti-card);
  border: 1px solid var(--gti-border);
  border-radius: 10px;
  padding: 16px 22px;
  flex: 1;
}

.stat-item .stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gti-blue-light);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-item .stat-label {
  font-size: 0.78rem;
  color: var(--gti-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   DETALHE DO PROJETO
   ============================================================ */
.project-hero {
  background: linear-gradient(135deg, var(--gti-card) 0%, #0C1828 100%);
  border: 1px solid var(--gti-border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.project-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gti-blue-dark), var(--gti-blue), var(--gti-blue-light));
}

.project-hero h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.project-hero .hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--gti-text-muted);
  font-size: 0.85rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.detail-section {
  background: var(--gti-card);
  border: 1px solid var(--gti-border);
  border-radius: var(--radius);
  padding: 24px;
  padding-bottom: 28px;
  overflow: auto;
  resize: vertical;
  min-height: 100px;
  max-height: 600px;
  position: relative;
}

/* Visible resize grip bar */
.detail-section::after {
  content: "⋯";
  position: sticky;
  bottom: 0;
  display: block;
  text-align: center;
  font-size: 1.2rem;
  letter-spacing: 4px;
  color: rgba(255,255,255,.15);
  cursor: ns-resize;
  padding: 2px 0;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.06);
  transition: color 0.2s ease;
}

.detail-section:hover::after {
  color: rgba(40, 121, 232, .5);
}

.detail-section.full-width {
  grid-column: 1 / -1;
}

.detail-section h3 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gti-blue-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section p,
.detail-section pre {
  color: var(--gti-text);
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Equipe chips */
.team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(40,121,232,0.1);
  border: 1px solid rgba(40,121,232,0.25);
  color: var(--gti-blue-light);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* ============================================================
   FORMULÁRIO DE UPDATE
   ============================================================ */
.form-card {
  background: var(--gti-card);
  border: 1px solid var(--gti-border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gti-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.gti-select,
.gti-textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--gti-border);
  border-radius: 8px;
  color: var(--gti-text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 12px 16px;
  transition: var(--transition);
  outline: none;
  appearance: none;
}

.gti-select:focus,
.gti-textarea:focus {
  border-color: var(--gti-blue);
  box-shadow: 0 0 0 3px var(--gti-blue-glow);
}

.gti-textarea { resize: vertical; line-height: 1.6; }

/* Select custom arrow */
.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gti-text-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gti-blue), var(--gti-blue-dark));
  color: #fff;
  box-shadow: 0 4px 16px var(--gti-blue-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gti-blue-light), var(--gti-blue));
  box-shadow: 0 6px 24px rgba(40,121,232,.45);
  transform: translateY(-1px);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--gti-text-muted);
  border: 1px solid var(--gti-border);
}

.btn-ghost:hover {
  border-color: var(--gti-blue);
  color: var(--gti-blue-light);
}

.btn-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  color: var(--gti-text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--gti-text);
  margin-bottom: 8px;
}

.empty-state p { font-size: 0.88rem; }

/* ============================================================
   ALERTS / MENSAGENS
   ============================================================ */
.alert-container {
  padding: 0 40px;
  margin-bottom: 16px;
}

.alert {
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  color: #4ade80;
}

.alert-error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(40,121,232,.25) 0%, transparent 70%),
    var(--gti-black);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--gti-border);
  border-radius: 16px;
  padding: 40px;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo-img {
  width: 220px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
  filter: drop-shadow(0 4px 24px rgba(40, 121, 232, 0.35));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.login-logo-img:hover {
  filter: drop-shadow(0 6px 32px rgba(40, 121, 232, 0.55));
  transform: scale(1.02);
}

.login-logo p {
  font-size: 0.82rem;
  color: var(--gti-text-muted);
  margin-top: 2px;
  letter-spacing: 0.4px;
}

.login-field {
  margin-bottom: 18px;
}

.login-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gti-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.login-field input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--gti-border);
  border-radius: 8px;
  color: var(--gti-text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: var(--transition);
  outline: none;
}

.login-field input:focus {
  border-color: var(--gti-blue);
  box-shadow: 0 0 0 3px var(--gti-blue-glow);
}

.login-field input::placeholder { color: #3a5070; }

/* Linha remember-me + esqueceu a senha */
.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  margin-top: -6px;
}

/* Checkbox customizado */
.remember-me-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gti-text-muted);
  user-select: none;
  transition: color 0.2s ease;
}

.remember-me-label:hover {
  color: var(--gti-blue-light);
}

.remember-me-checkbox {
  display: none;
}

.remember-me-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--gti-border);
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remember-me-checkbox:checked + .remember-me-box {
  background: var(--gti-blue);
  border-color: var(--gti-blue);
}

.remember-me-checkbox:checked + .remember-me-box::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

.login-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--gti-blue) 0%, var(--gti-blue-dark) 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px var(--gti-blue-glow);
  margin-top: 8px;
  font-family: inherit;
}

.login-btn:hover {
  background: linear-gradient(135deg, var(--gti-blue-light) 0%, var(--gti-blue) 100%);
  box-shadow: 0 8px 28px rgba(40,121,232,.5);
  transform: translateY(-1px);
}

.login-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.84rem;
  margin-top: 16px;
  text-align: center;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--gti-text-muted);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--gti-text-muted); transition: var(--transition); }
.breadcrumb a:hover { color: var(--gti-blue-light); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--gti-text); }

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--gti-border);
  margin: 24px 0;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gti-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gti-blue-dark); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --gti-sidebar-w: 0px; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .page-header, .page-body, .alert-container { padding-left: 20px; padding-right: 20px; }
  .detail-grid { grid-template-columns: 1fr; }
  .stats-bar { flex-wrap: wrap; }
  .projects-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   URGENT BANNER (Dashboard Top Alert)
   ============================================================ */
.urgent-banner {
  background: linear-gradient(135deg, rgba(239,68,68,.15) 0%, rgba(239,68,68,.05) 100%);
  border: 1px solid rgba(239,68,68,.4);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  animation: urgent-glow 2s ease-in-out infinite;
}

@keyframes urgent-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.0); }
  50% { box-shadow: 0 0 20px rgba(239,68,68,.25); }
}

.urgent-banner-icon {
  font-size: 1.5rem;
  animation: pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
  margin-top: 2px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.urgent-banner-content strong {
  display: block;
  color: #f87171;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.urgent-banner-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.urgent-ticket-link {
  color: var(--gti-text-muted);
  font-size: 0.82rem;
  transition: var(--transition);
}

.urgent-ticket-link:hover {
  color: #f87171;
}

/* ============================================================
   PRIORITY BADGES (P0–P3)
   ============================================================ */
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.priority-p0 {
  background: rgba(239,68,68,.2);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.4);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50% { box-shadow: 0 0 8px rgba(239,68,68,.3); }
}

.priority-p1 {
  background: rgba(249,115,22,.15);
  color: #fb923c;
  border: 1px solid rgba(249,115,22,.3);
}

.priority-p2 {
  background: rgba(234,179,8,.15);
  color: #fbbf24;
  border: 1px solid rgba(234,179,8,.3);
}

.priority-p3 {
  background: rgba(34,197,94,.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,.3);
}

/* ============================================================
   CARD INDICATORS (Priority + Deadline on Dashboard Cards)
   ============================================================ */
.card-indicators {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.deadline-indicator {
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gti-text-muted);
}

.deadline-overdue { color: #f87171; }
.deadline-warning { color: #fbbf24; }
.deadline-ok { color: #4ade80; }
.deadline-none { color: #6b7280; }

/* Priority filter pills */
.priority-pill-0 { border-color: rgba(239,68,68,.3); }
.priority-pill-0.active { background: #ef4444; border-color: #ef4444; }
.priority-pill-1 { border-color: rgba(249,115,22,.3); }
.priority-pill-1.active { background: #f97316; border-color: #f97316; }
.priority-pill-2 { border-color: rgba(234,179,8,.3); }
.priority-pill-2.active { background: #eab308; border-color: #eab308; color: #000; }
.priority-pill-3 { border-color: rgba(34,197,94,.3); }
.priority-pill-3.active { background: #22c55e; border-color: #22c55e; }

/* ============================================================
   THERMOMETER CARDS (Detail Page)
   ============================================================ */
.thermometers-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.thermometer-card {
  background: var(--gti-card);
  border: 1px solid var(--gti-border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.thermometer-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gti-blue-dark), var(--gti-blue-light));
}

.thermometer-deadline-overdue::before { background: linear-gradient(90deg, #ef4444, #dc2626); }
.thermometer-deadline-warning::before { background: linear-gradient(90deg, #eab308, #f59e0b); }
.thermometer-deadline-ok::before { background: linear-gradient(90deg, #22c55e, #16a34a); }

.thermometer-card h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gti-blue-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 18px;
}

/* Deadline phases */
.deadline-phases {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.deadline-phase {
  flex: 1;
  min-width: 80px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--gti-border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.deadline-label {
  display: block;
  font-size: 0.7rem;
  color: var(--gti-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.deadline-date {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gti-text);
}

/* Deadline status bar */
.deadline-status-bar {
  margin-top: 4px;
}

.deadline-bar {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.deadline-bar-overdue {
  background: rgba(239,68,68,.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.3);
  animation: urgent-glow 2s ease-in-out infinite;
}

.deadline-bar-warning {
  background: rgba(234,179,8,.15);
  color: #fbbf24;
  border: 1px solid rgba(234,179,8,.3);
}

.deadline-bar-ok {
  background: rgba(34,197,94,.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,.3);
}

/* ============================================================
   PRIORITY THERMOMETER (Detail Page)
   ============================================================ */
.priority-thermometer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.priority-level {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gti-text-muted);
  background: rgba(255,255,255,.02);
  border: 1px solid transparent;
  transition: var(--transition);
  opacity: .4;
}

.priority-level.priority-active {
  opacity: 1;
  font-weight: 700;
  color: #fff;
  transform: scale(1.02);
}

.priority-level-0.priority-active {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.4);
}

.priority-level-1.priority-active {
  background: rgba(249,115,22,.15);
  border-color: rgba(249,115,22,.3);
}

.priority-level-2.priority-active {
  background: rgba(234,179,8,.15);
  border-color: rgba(234,179,8,.3);
}

.priority-level-3.priority-active {
  background: rgba(34,197,94,.15);
  border-color: rgba(34,197,94,.3);
}

.priority-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gti-border);
  flex-shrink: 0;
}

.priority-level-0 .priority-dot { background: #ef4444; }
.priority-level-1 .priority-dot { background: #f97316; }
.priority-level-2 .priority-dot { background: #eab308; }
.priority-level-3 .priority-dot { background: #22c55e; }

.priority-level-0.priority-active .priority-dot {
  box-shadow: 0 0 8px rgba(239,68,68,.6);
  animation: pulse 1.5s ease-in-out infinite;
}

/* ============================================================
   TICKETS SECTION (Detail Page)
   ============================================================ */
.tickets-section {
  margin-top: 28px;
}

.tickets-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}

.tickets-list {
  background: var(--gti-card);
  border: 1px solid var(--gti-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.ticket-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gti-border);
}

.ticket-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ticket-item:first-child {
  padding-top: 0;
}

.ticket-priority {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.ticket-title {
  font-weight: 600;
  color: var(--gti-text);
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.ticket-meta {
  font-size: 0.76rem;
  color: var(--gti-text-muted);
}

.ticket-desc {
  font-size: 0.82rem;
  color: var(--gti-text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

.ticket-urgent {
  background: rgba(239,68,68,.05);
  border-radius: 8px;
  padding: 14px !important;
  margin-bottom: 4px;
}

.tickets-resolved {
  opacity: .7;
}

/* ============================================================
   FILES SECTION (Detail Page)
   ============================================================ */
.files-section,
.images-section {
  margin-top: 28px;
}

.files-section h2,
.images-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
}

.empty-hint {
  color: var(--gti-text-muted);
  font-style: italic;
  text-align: center;
  padding: 24px;
  font-size: 0.88rem;
}

/* File Cards */
.files-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--gti-card);
  border: 1px solid var(--gti-border);
  border-radius: 10px;
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.file-card:hover {
  border-color: rgba(40, 121, 232, 0.5);
  background: var(--gti-card-hover);
  color: inherit;
  transform: translateX(4px);
}

.file-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.file-info { flex: 1; min-width: 0; }

.file-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gti-text);
  margin-bottom: 4px;
}

.file-meta {
  font-size: 0.76rem;
  color: var(--gti-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.file-ext-badge {
  display: inline-block;
  background: rgba(40,121,232,.15);
  color: var(--gti-blue-light);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.file-download {
  font-size: 1.2rem;
  color: var(--gti-text-muted);
  flex-shrink: 0;
  opacity: 0;
  transition: var(--transition);
}

.file-card:hover .file-download {
  opacity: 1;
  color: var(--gti-blue-light);
}

/* ============================================================
   IMAGES SECTION (Detail Page)
   ============================================================ */

/* Thumbnail Grid — small previews */
.thumb-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.thumb-item {
  width: 90px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thumb-item:hover {
  transform: translateY(-3px);
}

.thumb-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--gti-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumb-item:hover img {
  border-color: var(--gti-blue-light);
  box-shadow: 0 4px 20px rgba(40, 121, 232, 0.3);
}

.thumb-label {
  font-size: 0.65rem;
  color: var(--gti-text-muted);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

/* Lightbox Overlay */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.lightbox-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10000;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-content {
  text-align: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  color: rgba(255,255,255,.8);
  font-size: 0.88rem;
  margin-top: 14px;
  font-weight: 500;
}

/* ============================================================
   RESPONSIVE — Thermometers + Files/Images
   ============================================================ */
@media (max-width: 768px) {
  .thermometers-row { grid-template-columns: 1fr; }
  .deadline-phases { flex-direction: column; }
  .thumb-item { width: 70px; }
  .thumb-item img { width: 64px; height: 64px; }
}
