/* =========================================================
   SAÍDA DE CAMPO — modal de ajuste e cartão do dirigente
   Reaproveita .set-group / .ms-input / .seg de settings.css e
   meeting-settings.css, para manter a mesma linguagem visual.
========================================================= */

/* ---------- Modal de ajuste do dia ---------- */
.fsd-overlay{
  position: fixed; inset: 0; z-index: 440;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(10, 18, 35, .52); opacity: 0; transition: opacity .22s ease;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.fsd-overlay.on{ opacity: 1; }
body.fsd-locked{ overflow: hidden; }

.fsd-box{
  position: relative; width: min(560px, 100%); max-height: 94vh; overflow-y: auto;
  scrollbar-width: none;                       /* sem a barra feia na lateral */
  background: var(--card, #fff); border-radius: 24px 24px 0 0;
  box-shadow: 0 -24px 60px -24px rgba(10, 18, 35, .55);
  transform: translateY(18px) scale(.98); opacity: .6;
  transition: transform .3s cubic-bezier(.2, .9, .25, 1), opacity .25s ease;
  padding-bottom: env(safe-area-inset-bottom);
}
.fsd-box::-webkit-scrollbar{ width: 0; height: 0; display: none; }
.fsd-overlay.on .fsd-box{ transform: none; opacity: 1; }
@media (min-width: 721px){
  .fsd-overlay{ align-items: center; }
  .fsd-box{ border-radius: 24px; }
}

.fsd-head{
  position: relative; padding: 20px 22px 18px; color: #fff; border-radius: 24px 24px 0 0;
  -webkit-user-select: none; user-select: none;
  background: linear-gradient(140deg, #0B2A63 0%, #12612F 85%);
}
@media (min-width: 721px){ .fsd-box .fsd-head{ border-radius: 24px 24px 0 0; } }
.fsd-head h3{ margin: 0 0 2px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.fsd-sub{ margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, .82); }
.fsd-x{
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 0; border-radius: 11px; background: rgba(255, 255, 255, .2); color: #fff;
}
.fsd-x svg{ width: 17px; height: 17px; }
.fsd-x:hover{ background: rgba(255, 255, 255, .32); }
.fsd-x:focus-visible{ outline: 3px solid #fff; outline-offset: 2px; }

.fsd-body{ padding: 18px 20px 20px; }
.fsd-area{ min-height: 86px; resize: vertical; font-size: 15px; }
.fsd-actions{ display: flex; gap: 10px; margin-top: 4px; }
.fsd-actions .btn{ flex: 1 1 0; min-height: 50px; }

/* botão "Ajustar" na linha do dia, na programação de campo */
.fs-day-tune{
  flex: 0 0 auto; min-height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line, #d9e0ea); background: var(--paper-raised, #fff);
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-soft, #51607a); cursor: pointer;
}
.fs-day-tune:hover{ border-color: var(--brand, #0b2a63); color: var(--brand, #0b2a63); }
.fs-day-tune:focus-visible{ outline: none; box-shadow: 0 0 0 3px rgba(23, 134, 252, .3); }

/* ---------- Cartão de quem dirige (página Início) ---------- */
.fo-card{
  margin-bottom: 16px; background: var(--card, #fff);
  border: 1px solid var(--line, #e3e9f2); border-left: 4px solid #15803D;
  border-radius: 14px; padding: 15px 17px;
}
.fo-head{ display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fo-badge{
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #15803D; background: #E7F7EC; border-radius: 999px; padding: 4px 11px;
}
.fo-count{ font-size: 12.5px; color: var(--text-muted, #667085); }

.fo-item{ padding-top: 13px; margin-top: 13px; border-top: 1px solid var(--line-soft, #eef1f6); }
.fo-item:first-of-type{ border-top: 0; margin-top: 10px; }
.fo-item-top{ display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.fo-item-top b{ font-size: 16px; font-weight: 800; color: var(--ink, #0f1b33); }
.fo-chip{
  font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 3px 10px;
  background: #EEF2F7; color: #51607a;
}
.fo-chip.fo-zoom{ background: #E8F0FF; color: #1D4ED8; }
.fo-chip.fo-hibrido{ background: #FFF4E5; color: #B7791F; }
.fo-week{ margin: 3px 0 0; font-size: 12.5px; color: var(--text-muted, #667085); }

.fo-facts{ margin: 11px 0 0; display: grid; gap: 7px; }
.fo-facts > div{ display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px; align-items: start; }
.fo-facts dt{
  font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-muted, #667085); padding-top: 2px;
}
.fo-facts dd{ margin: 0; font-size: 14.5px; color: var(--ink, #0f1b33); overflow-wrap: anywhere; }
@media (max-width: 520px){
  .fo-facts > div{ grid-template-columns: 1fr; gap: 1px; }
  .fo-facts dd{ font-size: 15px; }
}

.fo-notes{
  margin: 12px 0 0; padding: 11px 13px; border-radius: 12px;
  background: var(--paper, #f4f7fb); border: 1px solid var(--line-soft, #e8edf4);
  font-size: 13.5px; line-height: 1.5; color: var(--ink, #0f1b33); overflow-wrap: anywhere;
}
.fo-pending{
  margin: 11px 0 0; font-size: 13px; line-height: 1.45; color: #8C1D16;
}
.fo-actions{ display: flex; gap: 9px; margin-top: 13px; flex-wrap: wrap; }
.fo-actions .btn{ min-height: 44px; text-decoration: none; }
@media (max-width: 520px){ .fo-actions .btn{ flex: 1 1 0; } }

@media (prefers-reduced-motion: reduce){
  .fsd-overlay, .fsd-box{ animation: none !important; transition: none !important; }
}

/* =========================================================
   SAÍDAS DE CAMPO — visão de todos na aba Campo
   Lista compacta: quando, formato, quem dirige e como entrar.
   Alvos de toque de 44px e nada de cor sozinha carregando
   significado (o formato vem escrito no chip, não só colorido).
========================================================= */
.fop-card{
  background: var(--card, #fff); border: 1px solid var(--line, #e3e9f2);
  border-radius: 16px; padding: 16px 18px 18px; margin: 4px 0 22px;
  box-shadow: var(--shadow-1, 0 1px 2px rgba(16,24,40,.06));
}
.fop-title{
  margin: 0 0 2px; font-size: 16px; font-weight: 800;
  letter-spacing: -.01em; color: var(--ink, #0f1b33);
}
.fop-empty{
  margin: 8px 0 0; font-size: 13.5px; line-height: 1.55;
  color: var(--text-muted, #667085);
}
.fop-week{
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 16px 0 8px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand, #0b2a63);
}
.fop-week span{
  font-size: 11.5px; font-weight: 700; letter-spacing: 0;
  text-transform: none; color: var(--text-muted, #667085);
}
.fop-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.fop-item{
  display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px;
  padding: 13px 14px; border-radius: 13px;
  background: var(--paper, #f6f8fc); border: 1px solid var(--line-soft, #e8edf4);
}
.fop-item.is-today{
  background: #F0F7FF; border-color: #BBD6FF;
  box-shadow: inset 3px 0 0 var(--brand-accent, #1786fc);
}
.fop-item.is-past{ opacity: .62; }

.fop-when{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fop-day{ font-size: 14px; font-weight: 800; color: var(--ink, #0f1b33); }
.fop-date{ font-size: 12px; color: var(--text-muted, #667085); font-variant-numeric: tabular-nums; }
.fop-today{
  align-self: flex-start; margin-top: 3px; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--brand, #0b2a63); color: #fff;
}

.fop-main{ min-width: 0; }
.fop-top{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fop-chip{
  font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 3px 10px;
  background: #EEF2F7; color: #51607a; white-space: nowrap;
}
.fop-chip.fop-zoom{ background: #E8F0FF; color: #1D4ED8; }
.fop-chip.fop-hibrido{ background: #FFF4E5; color: #8A5A08; }
.fop-time{
  font-size: 15px; font-weight: 800; color: var(--ink, #0f1b33);
  font-variant-numeric: tabular-nums;
}

.fop-who{ margin: 7px 0 0; font-size: 14px; line-height: 1.4; color: var(--ink, #0f1b33); }
.fop-who span{ color: var(--text-muted, #667085); font-size: 12.5px; }
.fop-who b{ font-weight: 800; }
.fop-who-vazio span{ font-style: italic; }

.fop-line{
  margin: 4px 0 0; font-size: 13.5px; line-height: 1.5;
  color: var(--ink-soft, #51607a); overflow-wrap: anywhere;
}
.fop-terr{ font-weight: 700; color: var(--ink, #0f1b33); }
.fop-zoom-ids b{ font-variant-numeric: tabular-nums; color: var(--ink, #0f1b33); }
/* Sem caixa branca com borda: isso faz o aviso parecer um campo de
   digitação. Um filete à esquerda marca que é recado, não formulário. */
.fop-notes{
  margin: 8px 0 0; padding: 2px 0 2px 11px;
  border-left: 3px solid var(--line, #dbe3ee);
  font-size: 13px; line-height: 1.5; color: var(--ink-soft, #51607a);
}

.fop-actions{ display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
#appRoot .fop-actions .btn{
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; line-height: 1.2;
}

/* ---------- Celular: o dia vira cabeçalho da linha ---------- */
@media (max-width: 620px){
  .fop-card{ padding: 14px 14px 16px; }
  .fop-item{ grid-template-columns: 1fr; gap: 8px; }
  .fop-when{
    flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap;
    padding-bottom: 8px; border-bottom: 1px dashed var(--line, #dbe3ee);
  }
  .fop-today{ margin-top: 0; }
  #appRoot .fop-actions .btn{ flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce){
  .fop-item, .fop-actions .btn{ transition: none !important; animation: none !important; }
}

/* ---------- Seleção de território no modal da saída ---------- */
/* O select herda .ms-input, mas sem appearance/padding próprios ele fica
   com a seta nativa colada no texto e altura menor que os inputs ao lado. */
.fsd-box select.ms-input{
  -webkit-appearance: none; appearance: none;
  min-height: 46px; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2351607a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 17px;
}
.fsd-hint{
  display: block; margin-top: 5px; font-size: 12px; line-height: 1.45;
  color: var(--text-muted, #667085); font-weight: 500;
}

/* ---------- Botão "Ver no mapa" ---------- */
.fop-terr-row{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.fop-terr-row .fop-terr{ margin: 0; }
#appRoot .fop-map-btn{
  min-height: 34px; padding: 5px 11px; font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px; border-radius: 9px;
}
#appRoot .fop-map-btn svg{ width: 14px; height: 14px; flex: 0 0 auto; }
/* No celular o botão ganha alvo de toque cheio, numa linha só */
@media (max-width: 620px){
  .fop-terr-row{ display: block; }
  #appRoot .fop-map-btn{ min-height: 44px; width: 100%; justify-content: center; margin-top: 7px; }
}
.fo-terr-map{ margin-top: 2px; }
