/* =========================================================
   CONTROLE DE PÁTIO — TEMA AZUL (SaaS)
   ========================================================= */

:root{
  --primary: #2563eb;        /* azul */
  --primary-2: #1e40af;      /* azul escuro */
  --primary-soft: rgba(37,99,235,.14);

  --bg-1: #eef4ff;
  --bg-2: #f8fbff;

  --card: #ffffff;
  --text: #0f172a;
  --muted: rgba(15,23,42,.65);

  --border: rgba(15,23,42,.10);
  --shadow: 0 10px 26px rgba(15,23,42,.10);
  --shadow-strong: 0 18px 45px rgba(2,6,23,.22);
}

/* ================= Base ================= */
html, body{ height: 100%; width: 100%; }
body{
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  color: var(--text);
  overflow-x: hidden;
}

img, svg, video{ max-width: 100%; height: auto; }
.container{ max-width: 1200px; }

/* ================= Navbar (vida + sombra preta) ================= */
.app-header{ position: sticky; top: 0; z-index: 1030; }

.app-navbar{
  background: linear-gradient(90deg, #0b1220 0%, #0b2b6a 40%, #2563eb 100%);
  border-bottom: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 40px rgba(0,0,0,.40);
  position: relative;
  overflow: hidden;
}

/* brilho/vida */
.app-navbar::before{
  content:"";
  position:absolute;
  inset:-40% -30%;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.22), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.14), transparent 55%);
  transform: rotate(-6deg);
  pointer-events:none;
  opacity:.9;
}

.brand-mark{
  width: 36px; height: 36px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 900;
  color: #fff;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 0 14px rgba(255,255,255,.18);
}

.app-brand-text{
  color: rgba(255,255,255,.95);
  font-weight: 800;
  letter-spacing: .25px;
}

.app-navlinks .nav-link{
  color: rgba(255,255,255,.86);
  padding: .45rem .85rem;
  border-radius: 999px;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}

.app-navlinks .nav-link:hover{
  background: rgba(255,255,255,.16);
  color: #fff;
  transform: translateY(-1px);
}

/* página selecionada com destaque */
.app-navlinks .nav-link.active{
  background: rgba(255,255,255,.26);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset, 0 10px 22px rgba(0,0,0,.22);
}

.app-userchip{
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

.app-username{ color: rgba(255,255,255,.92); font-weight: 650; }

/* ================= Cards / UI ================= */
.card{
  background: var(--card);
  border-radius: 18px;
  border: 1px solid rgba(37,99,235,.14);
  box-shadow: var(--shadow);
}

.card-header{
  background: linear-gradient(180deg, #ffffff, #f4f8ff) !important;
  border-bottom: 1px solid rgba(37,99,235,.14) !important;
  font-weight: 650;
}

.btn{ border-radius: 14px; }

.btn-primary{
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border: none;
  box-shadow: 0 10px 22px rgba(37,99,235,.32);
}

.btn-primary:hover{
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37,99,235,.40);
}

.btn-outline-primary{
  border-color: rgba(37,99,235,.45);
}

.btn-outline-primary:hover{
  background: rgba(37,99,235,.10);
  border-color: rgba(37,99,235,.65);
}

/* Inputs */
.form-control, .form-select, textarea.form-control{
  border-radius: 14px;
  border-color: rgba(37,99,235,.20);
}

.form-control:focus, .form-select:focus, textarea.form-control:focus{
  border-color: rgba(37,99,235,.70);
  box-shadow: 0 0 0 .2rem rgba(37,99,235,.14);
}

/* ================= Dashboard hero / KPIs ================= */
.hero-card{
  border-radius: 22px;
  padding: 26px;
  color: #fff;
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(255,255,255,.18), transparent 55%),
    linear-gradient(135deg, #1e40af, #2563eb);
  box-shadow: 0 22px 55px rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.14);
}

.kpi-card{
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(37,99,235,.14);
  background: #fff;
  box-shadow: var(--shadow);
}

.kpi-num{
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.kpi-label{ color: var(--muted); font-weight: 650; }

/* ================= Tabelas + hover pointer ================= */
.table{ border-radius: 14px; overflow: hidden; }
.table thead{
  background: linear-gradient(90deg,#e6efff,#f6f9ff);
}
.table-hover tbody tr:hover{
  background: rgba(37,99,235,.06);
}
.row-clickable{ cursor: pointer; }
.row-clickable:hover td{
  background: rgba(37,99,235,.06);
}

/* Preview flutuante da foto */
.photo-flyout{
  position: fixed;
  z-index: 9999;
  width: 220px;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  background: #0b1220;
  box-shadow: 0 18px 55px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.10);
  display: none;
}
.photo-flyout img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-flyout .label{
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.92);
  background: rgba(0,0,0,.45);
  padding: 6px 8px;
  border-radius: 12px;
}

/* Barra inferior (se usar) */
.form-has-bottom-bar{ padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.bottom-action-bar{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1020;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.92);
  border-top: 1px solid rgba(37,99,235,.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (max-width: 576px){
  .bottom-action-bar{ position: sticky; }
}

/* Footer */
footer.footer{
  background: #fff;
  border-top: 1px solid rgba(37,99,235,.14);
}

.brand-logo{
  padding: 0 !important;
  overflow: hidden;
}

.brand-logo-img{
  width: 100%;
  height: 100%;
  object-fit: cover;   /* se o logo não for quadrado, ele encaixa bonito */
  display: block;
  border-radius: 999px;
}