/* assets/style.css — base do app + extras */
:root {
  --ind: #4a36b5;
  --indl: #7a63f1;
  --or: #f27221;
}

* {
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Outfit', sans-serif;
  color: #e2e8f0;
  min-height: 100vh;
  background: radial-gradient(1100px 600px at 5% -10%, rgba(74, 54, 181, .30), transparent 60%),
              radial-gradient(900px 500px at 105% 8%, rgba(242, 114, 33, .15), transparent 55%),
              #05050A;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.card {
  background: linear-gradient(145deg, rgba(30, 30, 42, .78), rgba(14, 14, 20, .78));
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px -14px rgba(0, 0, 0, .65);
}

.inp {
  width: 100%;
  background: #0b0b12;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: 10px 14px;
  color: #fff;
  outline: none;
  margin-top: 4px;
  transition: .2s;
}

.inp:focus {
  border-color: var(--indl);
  box-shadow: 0 0 0 3px rgba(122, 99, 241, .25);
}

.lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.btn {
  background: linear-gradient(90deg, var(--ind), var(--indl));
  color: #fff;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  transition: .15s;
  box-shadow: 0 6px 20px -8px rgba(122, 99, 241, .7);
}

.btn:hover {
  filter: brightness(1.12);
}

.btn:active {
  transform: scale(.97);
}

.btn:disabled {
  opacity: .4;
}

.btn-or {
  background: linear-gradient(90deg, #e0561a, var(--or));
  box-shadow: 0 6px 20px -8px rgba(242, 114, 33, .7);
}

.btn-ok {
  background: linear-gradient(90deg, #059669, #10b981);
}

.btn-ghost {
  color: #9ca3af;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

/* Área de clique estendida para links e ações (Acessibilidade Mobile) */
.lnk {
  color: var(--indl);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 12px;
  margin: -8px -4px;
  display: inline-block;
  cursor: pointer;
}

.lnk:hover {
  text-decoration: underline;
}

.lnk.red { color: #f87171; }
.lnk.y { color: #facc15; }
.lnk.g { color: #34d399; }

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #9ca3af;
  font-weight: 600;
  font-size: 14px;
  transition: .2s;
}

.nav a:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.nav a.on {
  background: linear-gradient(90deg, rgba(74, 54, 181, .55), rgba(122, 99, 241, .25));
  color: #fff;
}

.pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}

.p-ok { background: rgba(16, 185, 129, .18); color: #6ee7b7; }
.p-wa { background: rgba(250, 204, 21, .18); color: #fde047; }
.p-bad { background: rgba(239, 68, 68, .2); color: #fca5a5; }
.p-gr { background: rgba(148, 163, 184, .2); color: #cbd5e1; }

.it {
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  border: 1px solid transparent;
  margin-bottom: 6px;
  transition: .15s;
}

.it:hover {
  background: rgba(255, 255, 255, .05);
}

.it.on {
  background: rgba(74, 54, 181, .45);
  border-color: rgba(122, 99, 241, .6);
}

.rb {
  padding: 7px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .15);
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  transition: .15s;
}

.rb:hover {
  border-color: var(--indl);
}

.rb.s-ok { background: #059669; border-color: #059669; color: #fff; }
.rb.s-bad { background: #dc2626; border-color: #dc2626; color: #fff; }
.rb.s-na { background: #52525b; border-color: #52525b; color: #fff; }

.step {
  width: 38px;
  height: 38px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: #11111a;
  border: 2px solid rgba(255, 255, 255, .12);
  flex: none;
}

.step.done { background: #059669; border-color: #059669; color: #fff; }
.step.cur { background: var(--or); border-color: var(--or); color: #fff; box-shadow: 0 0 0 5px rgba(242, 114, 33, .2); }

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #065f46;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  z-index: 99;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  animation: fin .3s;
}

.toast.bad {
  background: #991b1b;
}

#ov {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
  overflow: auto;
}

#ov.on { display: flex; }

#mb {
  width: 100%;
  max-width: 640px;
  max-height: 92vh;
  overflow: auto;
  background: #0e0e16;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: 24px;
}

#view {
  animation: fin .4s ease both;
}

@keyframes fin {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

table { border-collapse: collapse; }
tbody tr { border-top: 1px solid rgba(255, 255, 255, .06); }
tbody tr:hover { background: rgba(255, 255, 255, .03); }
th { font-size: 11px; text-transform: uppercase; color: #9ca3af; text-align: left; padding: 10px 8px; }
td { padding: 10px 8px; vertical-align: top; font-size: 14px; }

/* Extras */
/* Custom Scrollbar Premium - Fina e Elegante */
::-webkit-scrollbar { 
  width: 6px; 
  height: 6px; 
}
::-webkit-scrollbar-track { 
  background: transparent; 
}
::-webkit-scrollbar-thumb { 
  background: rgba(255, 255, 255, 0.08); 
  border-radius: 10px; 
}
::-webkit-scrollbar-thumb:hover { 
  background: rgba(122, 99, 241, 0.5); /* Cor Índigo ao passar o rato */
}

/* Ocultar barra de scroll em elementos específicos, mas permitir scroll */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Utilitário para as listas verticais (Hierarquia) */
.scrollbar-thin::-webkit-scrollbar {
  width: 4px;
}

/* Animações suaves para os modais */
#modal-crud {
  transition: opacity 0.3s ease-in-out;
}

/* Previne o zoom no iOS ao focar em inputs e corrige a visualização geral em dispositivos móveis */
@media screen and (max-width: 768px) {
  .inp, select, textarea, input {
    font-size: 16px !important;
  }
}
/* Galeria de fotos dos riscos */
.fto { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.fto img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .25s; }
.fto:hover img { transform: scale(1.04); }
.fto-ac { position: absolute; inset: auto 0 0 0; display: flex; justify-content: flex-end; gap: 8px; padding: 22px 8px 8px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.fto-ac button { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(4px); display: inline-flex; align-items: center; justify-content: center; }
.fto-ac button:hover { background: #7a63f1; }
.fto-ac button.red:hover { background: #dc2626; }
.fto-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #f27221; border: 2px dashed rgba(242,114,33,.45); cursor: pointer; transition: background .2s, border-color .2s; }
.fto-add:hover { background: rgba(242,114,33,.1); border-color: #f27221; }
/* Formulário com alterações ainda não salvas (rascunho local) */
form.rasc { border-color: rgba(242,114,33,.6) !important; }
form.rasc button.btn:last-child { box-shadow: 0 0 0 3px rgba(242,114,33,.35); }
