.filtro-animal{
  border:1px solid var(--border);
  background:white;
  color:#536158;
  border-radius:9px;
  padding:10px 13px;
  font-size:12px;
  font-weight:600;
}

.filtro-animal:hover{
  background:var(--green-soft);
  border-color:#c3ddce;
  color:var(--green);
}

.filtro-animal.filtro-ativo{
  background:var(--green);
  border-color:var(--green);
  color:white;
}

.animal-list-card{
  display:flex;
  align-items:center;
  gap:18px;
  background:white;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:17px;
  margin-bottom:13px;
  transition:.18s ease;
}

.animal-list-card:hover{
  transform:translateY(-2px);
  border-color:#c9dad0;
  box-shadow:0 12px 28px rgba(24,34,29,.07);
}

.animal-avatar-card{
  width:82px;
  height:82px;
  min-width:82px;
  border-radius:14px;
  background:#fae7e2;
  color:#d17e77;
  display:flex;
  align-items:center;
  justify-content:center;
}

.animal-avatar-card.male{
  background:#eaf3fa;
  color:#5c88aa;
}

.animal-avatar-card.young{
  background:#edf7ee;
  color:#5c9d6c;
}

.animal-avatar-card svg{
  width:55px;
  height:55px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.animal-main{
  flex:1;
  min-width:0;
}

.animal-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.animal-title-row h3{
  font-size:19px;
  font-weight:800;
  margin-bottom:4px;
}

.animal-title-row p{
  font-size:13px;
  color:var(--muted);
}

.animal-status{
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  white-space:nowrap;
}

.animal-status.gestante{
  color:#12683e;
  background:#e7f6ed;
}

.animal-status.alerta{
  color:#bd6a13;
  background:#fff0d8;
}

.animal-status.ativo{
  color:#166b41;
  background:#e7f6ed;
}

.animal-status.crescimento{
  color:#426a86;
  background:#e9f2f8;
}

.animal-details{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  margin-top:15px;
}

.animal-details small{
  display:block;
  color:#7b8881;
  font-size:11px;
  margin-bottom:3px;
}

.animal-details strong{
  display:block;
  font-size:13px;
}

.ver-ficha{
  border:0;
  background:transparent;
  color:var(--green);
  font-size:13px;
  font-weight:700;
  padding:10px;
  white-space:nowrap;
}

@media(max-width:850px){

  .animal-list-card{
    align-items:flex-start;
  }

  .animal-details{
    grid-template-columns:repeat(2,1fr);
  }

}

@media(max-width:600px){

  .animal-list-card{
    display:block;
  }

  .animal-avatar-card{
    width:100%;
    height:120px;
    margin-bottom:14px;
  }

  .animal-title-row{
    display:block;
  }

  .animal-status{
    display:inline-block;
    margin-top:9px;
  }

  .animal-details{
    grid-template-columns:repeat(2,1fr);
  }

  .ver-ficha{
    display:block;
    width:100%;
    margin-top:12px;
    text-align:right;
  }

}
    *{
      margin:0;
      padding:0;
      box-sizing:border-box;
    }

    :root{
      --green:#197347;
      --green-dark:#115936;
      --green-soft:#eaf6ef;
      --green-soft-2:#f4fbf7;
      --bg:#f5f7f6;
      --card:#ffffff;
      --border:#e2e8e4;
      --text:#18221d;
      --muted:#64736a;
      --muted-2:#87928c;
      --red:#eb6268;
      --red-soft:#fff1f2;
      --orange:#e7a129;
      --orange-soft:#fff6e8;
      --shadow:0 8px 24px rgba(24,34,29,.05);
      --radius:16px;
    }

    html,body{
      min-height:100%;
      background:var(--bg);
      color:var(--text);
      font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
      -webkit-font-smoothing:antialiased;
      text-rendering:optimizeLegibility;
    }

    body{
      overflow-x:hidden;
    }

    a{
      text-decoration:none;
      color:inherit;
    }

    input,button{
      font:inherit;
    }

    button{
      cursor:pointer;
      background:none;
      border:0;
    }

    svg{
      display:block;
    }

    .app{
      min-height:100vh;
      display:flex;
    }

    .sidebar{
      width:246px;
      background:#fff;
      border-right:1px solid var(--border);
      position:fixed;
      top:0;
      left:0;
      bottom:0;
      z-index:100;
      display:flex;
      flex-direction:column;
      padding:18px 14px 20px;
    }

    .brand{
      display:flex;
      align-items:center;
      gap:10px;
      padding:0 8px 16px;
      min-height:66px;
    }

    .brand > div{
      min-width:0;
    }

    .brand-logo{
      width:48px;
      height:48px;
      flex:none;
    }

    .brand-name{
      font-size:26px;
      line-height:1;
      letter-spacing:-1px;
      font-weight:800;
      white-space:nowrap;
    }

    .brand-name span{
      color:var(--green);
    }

    .brand-sub{
      margin-top:6px;
      color:var(--muted);
      font-size:13px;
      line-height:1.25;
    }

    .menu{
      display:flex;
      flex-direction:column;
      gap:5px;
      margin-top:10px;
    }

    .menu-item{
      min-height:44px;
      display:flex;
      align-items:center;
      gap:12px;
      padding:0 12px;
      border-radius:11px;
      color:#44534a;
      font-size:14px;
      font-weight:500;
      transition:.18s ease;
    }

    .menu-item:hover{
      background:#f2f7f4;
      color:var(--green);
      transform:translateX(1px);
    }

    .menu-item.active{
      background:var(--green);
      color:#fff;
      font-weight:700;
    }

    .menu-icon{
      width:18px;
      height:18px;
      flex:none;
    }

    .menu-icon svg{
      width:18px;
      height:18px;
      fill:none;
      stroke:currentColor;
      stroke-width:1.9;
      stroke-linecap:round;
      stroke-linejoin:round;
    }

    .sidebar-foot{
      margin-top:auto;
      border-top:1px solid var(--border);
      padding:16px 8px 0;
    }

    .sidebar-foot strong{
      display:block;
      font-size:13px;
      margin-bottom:4px;
      color:#304038;
    }

    .sidebar-foot span{
      color:var(--muted);
      font-size:11px;
      line-height:1.45;
    }

    .main{
      margin-left:246px;
      width:calc(100% - 246px);
      min-height:100vh;
    }

    .topbar{
      position:sticky;
      top:0;
      z-index:80;
      height:74px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:20px;
      padding:0 28px;
      background:rgba(255,255,255,.96);
      border-bottom:1px solid var(--border);
      backdrop-filter:blur(10px);
    }

    .mobile-toggle{
      display:none;
      width:42px;
      height:42px;
      border-radius:10px;
      align-items:center;
      justify-content:center;
      color:#46544c;
    }

    .mobile-toggle svg{
      width:24px;
      height:24px;
      fill:none;
      stroke:currentColor;
      stroke-width:2;
    }

    .search-wrap{
      position:relative;
      width:min(540px,46vw);
    }

    .search-icon{
      position:absolute;
      left:14px;
      top:50%;
      transform:translateY(-50%);
      width:18px;
      height:18px;
      color:#8b9690;
      pointer-events:none;
    }

    .search-icon svg{
      width:18px;
      height:18px;
      fill:none;
      stroke:currentColor;
      stroke-width:2;
    }

    .search-input{
      width:100%;
      height:44px;
      border-radius:12px;
      border:1px solid transparent;
      outline:none;
      background:#f3f6f4;
      padding:0 16px 0 42px;
      font-size:14px;
      color:#34423a;
      transition:.2s ease;
    }

    .search-input::placeholder{
      color:#909c95;
    }

    .search-input:focus{
      background:#fff;
      border-color:#bdd7c8;
      box-shadow:0 0 0 4px rgba(25,115,71,.07);
    }

    .top-user{
      display:flex;
      align-items:center;
      gap:12px;
    }

    .notification{
      width:40px;
      height:40px;
      border-radius:50%;
      background:#f5f7f6;
      display:flex;
      align-items:center;
      justify-content:center;
      position:relative;
      color:#536158;
    }

    .notification svg{
      width:18px;
      height:18px;
      fill:none;
      stroke:currentColor;
      stroke-width:1.9;
    }

    .notification.has-notification::after{
      content:'';
      position:absolute;
      right:4px;
      top:4px;
      width:8px;
      height:8px;
      border-radius:50%;
      background:#ed4b57;
      border:2px solid #fff;
    }

    .avatar{
      width:40px;
      height:40px;
      border-radius:50%;
      display:flex;
      align-items:center;
      justify-content:center;
      background:var(--green);
      color:#fff;
      font-size:13px;
      font-weight:800;
      flex:none;
    }

    .user-copy strong{
      display:block;
      font-size:13px;
      line-height:1.1;
    }

    .user-copy span{
      display:block;
      margin-top:3px;
      color:var(--muted);
      font-size:11px;
    }

    .user-arrow{
      width:16px;
      height:16px;
      color:#5a6860;
    }

    .user-arrow svg{
      width:16px;
      height:16px;
      fill:none;
      stroke:currentColor;
      stroke-width:2;
    }

    .content{
      max-width:1520px;
      margin:0 auto;
      padding:26px 28px 34px;
    }

    .welcome{
      display:flex;
      align-items:flex-start;
      justify-content:space-between;
      gap:16px;
      margin-bottom:22px;
    }

    .welcome-left{
      display:flex;
      align-items:flex-start;
      gap:12px;
    }

    .welcome-sun{
      width:32px;
      height:32px;
      color:#efa500;
      flex:none;
      margin-top:1px;
    }

    .welcome-sun svg{
      width:32px;
      height:32px;
      fill:none;
      stroke:currentColor;
      stroke-width:1.7;
    }

    .welcome h1{
      font-size:33px;
      font-weight:800;
      line-height:1.05;
      letter-spacing:-1px;
    }

    .welcome p{
      margin-top:6px;
      color:var(--muted);
      font-size:15px;
    }

    .today{
      margin-top:10px;
      color:var(--muted);
      font-size:13px;
      white-space:nowrap;
    }

    .stats{
      display:grid;
      grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
      gap:16px;
      margin-bottom:18px;
    }

    .stat{
      background:#fff;
      border:1px solid var(--border);
      border-radius:var(--radius);
      box-shadow:var(--shadow);
      min-height:104px;
      padding:18px;
      display:flex;
      align-items:center;
      gap:14px;
      transition:.18s ease;
    }

    .stat:hover{
      transform:translateY(-2px);
      box-shadow:0 14px 30px rgba(24,34,29,.08);
    }

    .stat-icon{
      width:48px;
      height:48px;
      min-width:48px;
      border-radius:14px;
      background:var(--green-soft);
      color:var(--green);
      display:flex;
      align-items:center;
      justify-content:center;
    }

    .stat-icon.red{
      background:var(--red-soft);
      color:var(--red);
    }

    .stat-icon.orange{
      background:var(--orange-soft);
      color:var(--orange);
    }

    .stat-icon svg{
      width:22px;
      height:22px;
      fill:none;
      stroke:currentColor;
      stroke-width:1.9;
      stroke-linecap:round;
      stroke-linejoin:round;
    }

    .stat-title{
      color:#57655d;
      font-size:12px;
      margin-bottom:5px;
    }

    .stat-value{
      font-size:37px;
      font-weight:800;
      line-height:1;
      letter-spacing:-1px;
    }

    .stat-change{
      margin-top:6px;
      color:#179352;
      font-size:12px;
      font-weight:600;
    }

    .stat-change.neutral{
      color:var(--muted);
      font-weight:500;
    }

    .section-head{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      margin:8px 0 12px;
    }

    .section-head h2{
      font-size:23px;
      font-weight:800;
      letter-spacing:-.5px;
    }

    .section-link{
      color:var(--green);
      font-size:14px;
      font-weight:700;
      white-space:nowrap;
    }

    .events{
      display:grid;
      grid-template-columns:repeat(3,1fr);
      gap:14px;
      margin-bottom:16px;
    }

    .event{
      min-height:88px;
      border:1px solid var(--border);
      border-left:4px solid var(--green);
      border-radius:14px;
      background:#fff;
      padding:14px 16px;
      display:flex;
      align-items:center;
      gap:14px;
    }

    .event.red{
      border-left-color:var(--red);
      background:var(--red-soft);
    }

    .event.orange{
      border-left-color:var(--orange);
      background:var(--orange-soft);
    }

    .event-icon{
      width:46px;
      height:46px;
      min-width:46px;
      border-radius:50%;
      background:var(--green-soft);
      color:var(--green);
      display:flex;
      align-items:center;
      justify-content:center;
    }

    .event.red .event-icon{
      background:#ffdfe2;
      color:var(--red);
    }

    .event.orange .event-icon{
      background:#ffe9bf;
      color:var(--orange);
    }

    .event-icon svg{
      width:21px;
      height:21px;
      fill:none;
      stroke:currentColor;
      stroke-width:1.9;
      stroke-linecap:round;
      stroke-linejoin:round;
    }

    .event strong{
      display:block;
      font-size:15px;
      margin-bottom:4px;
    }

    .event span{
      display:block;
      color:var(--muted);
      font-size:13px;
      line-height:1.35;
    }

    .quick-actions{
      display:grid;
      grid-template-columns:repeat(4,1fr);
      gap:14px;
      margin-bottom:18px;
    }

    .quick{
      background:#fff;
      border:1px solid var(--border);
      border-radius:14px;
      padding:14px 15px;
      display:flex;
      align-items:center;
      gap:12px;
      min-height:72px;
      transition:.18s ease;
    }

    .quick:hover{
      background:var(--green-soft-2);
      border-color:#c5dccf;
    }

    .quick-icon{
      width:40px;
      height:40px;
      min-width:40px;
      border-radius:12px;
      background:var(--green-soft);
      color:var(--green);
      display:flex;
      align-items:center;
      justify-content:center;
    }

    .quick-icon svg{
      width:19px;
      height:19px;
      fill:none;
      stroke:currentColor;
      stroke-width:1.9;
      stroke-linecap:round;
      stroke-linejoin:round;
    }

    .quick strong{
      display:block;
      font-size:14px;
      margin-bottom:3px;
    }

    .quick span{
      display:block;
      color:var(--muted);
      font-size:12px;
      line-height:1.3;
    }

    .dashboard-grid{
      display:grid;
      grid-template-columns:1.72fr .95fr;
      gap:16px;
      margin-bottom:16px;
    }

    .panel{
      background:#fff;
      border:1px solid var(--border);
      border-radius:18px;
      box-shadow:var(--shadow);
      padding:18px;
    }

    .panel-head{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:10px;
      margin-bottom:14px;
    }

    .panel-head h3{
      font-size:21px;
      font-weight:800;
      letter-spacing:-.5px;
    }

    .panel-filter{
      background:#fff;
      border:1px solid var(--border);
      border-radius:10px;
      padding:8px 12px;
      color:#68756d;
      font-size:12px;
      white-space:nowrap;
    }

    .weight-chart{
      position:relative;
      height:278px;
      padding-left:46px;
      padding-bottom:30px;
    }

    .weight-y{
      position:absolute;
      left:0;
      top:6px;
      bottom:30px;
      width:42px;
      display:flex;
      flex-direction:column;
      justify-content:space-between;
      text-align:right;
      padding-right:8px;
      color:#84918a;
      font-size:12px;
    }

    .weight-grid{
      position:absolute;
      left:46px;
      right:0;
      top:6px;
      bottom:30px;
      border-left:1px solid #dde5e0;
      border-bottom:1px solid #dde5e0;
      background:
        linear-gradient(to bottom, transparent 24%, #edf1ef 25%, transparent 26%, transparent 49%, #edf1ef 50%, transparent 51%, transparent 74%, #edf1ef 75%, transparent 76%),
        linear-gradient(to right, transparent 19%, #edf1ef 20%, transparent 21%, transparent 39%, #edf1ef 40%, transparent 41%, transparent 59%, #edf1ef 60%, transparent 61%, transparent 79%, #edf1ef 80%, transparent 81%);
    }

    .weight-svg{
      position:absolute;
      left:46px;
      right:0;
      top:6px;
      bottom:30px;
      width:calc(100% - 46px);
      height:calc(100% - 36px);
    }

    .weight-x{
      position:absolute;
      left:46px;
      right:0;
      bottom:4px;
      display:flex;
      justify-content:space-between;
      color:#84918a;
      font-size:12px;
    }

    .chart-legend{
      display:flex;
      justify-content:center;
      gap:22px;
      margin-top:8px;
      color:#68756d;
      font-size:12px;
      flex-wrap:wrap;
    }

    .legend-dot{
      display:inline-block;
      width:8px;
      height:8px;
      border-radius:50%;
      margin-right:6px;
      background:var(--green);
      vertical-align:middle;
    }

    .legend-dot.light{
      background:#7ea78e;
    }

    .legend-dot.reference{
      background:#bfd1c5;
    }

    .feed-summary{
      display:flex;
      align-items:center;
      gap:12px;
      margin-bottom:12px;
    }

    .feed-icon{
      width:46px;
      height:46px;
      border-radius:14px;
      background:var(--green-soft);
      color:var(--green);
      display:flex;
      align-items:center;
      justify-content:center;
      flex:none;
    }

    .feed-icon svg{
      width:22px;
      height:22px;
      fill:none;
      stroke:currentColor;
      stroke-width:1.9;
    }

    .feed-value{
      font-size:36px;
      font-weight:800;
      letter-spacing:-1px;
      line-height:1;    }

    .feed-change{
      margin-top:5px;
      color:#179352;
      font-size:12px;
      font-weight:600;
    }

    .feed-bars{
      height:150px;
      display:flex;
      align-items:flex-end;
      gap:10px;
      border-bottom:1px solid var(--border);
      padding-top:16px;
    }

    .feed-day{
      flex:1;
      text-align:center;
      color:#7d8982;
      font-size:11px;
    }

    .feed-bar{
      width:100%;
      background:#b7ddc8;
      border-radius:6px 6px 0 0;
      margin-bottom:7px;
    }

    .bottom-grid{
      display:grid;
      grid-template-columns:1.35fr 1fr;
      gap:16px;
    }

    .matrix-card{
      display:flex;
      gap:16px;
      align-items:stretch;
    }

    .matrix-photo{
      width:210px;
      min-width:210px;
      height:146px;
      border-radius:16px;
      overflow:hidden;
      background:linear-gradient(135deg,#efd6cd,#f9efea);
      position:relative;
      display:flex;
      align-items:center;
      justify-content:center;
    }

    .matrix-photo::after{
      content:'';
      position:absolute;
      inset:0;
      background:radial-gradient(circle at 75% 25%, rgba(255,255,255,.75), transparent 34%);
      pointer-events:none;
    }

    .matrix-photo svg{
      width:142px;
      height:105px;
      color:#cf887d;
      fill:none;
      stroke:currentColor;
      stroke-width:2;
      stroke-linecap:round;
      stroke-linejoin:round;
    }

    .matrix-body{
      flex:1;
      min-width:0;
    }

    .matrix-top{
      display:flex;
      justify-content:space-between;
      gap:16px;
      align-items:flex-start;
    }

    .matrix-name{
      font-size:23px;
      font-weight:800;
      margin-bottom:8px;
      letter-spacing:-.4px;
    }

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

    .tag{
      background:var(--green-soft);
      color:var(--green-dark);
      border-radius:999px;
      padding:6px 11px;
      font-size:12px;
      font-weight:700;
    }

    .gestation{
      min-width:150px;
      text-align:right;
      color:#68756d;
      font-size:13px;
    }

    .gestation strong{
      color:#314038;
      font-size:15px;
    }

    .progress{
      height:8px;
      background:#e5ece8;
      border-radius:999px;
      overflow:hidden;
      margin-top:8px;
    }

    .progress-fill{
      width:98%;
      height:100%;
      background:var(--green);
      border-radius:999px;
    }

    .matrix-data{
      display:grid;
      grid-template-columns:repeat(4,1fr);
      gap:14px;
      margin-top:18px;
    }

    .matrix-data small{
      display:block;
      color:#7b8881;
      font-size:12px;
      margin-bottom:4px;
    }

    .matrix-data strong{
      display:block;
      font-size:14px;
      font-weight:700;
      line-height:1.35;
    }

    .tasks{
      margin-top:4px;
    }

    .task{
      display:grid;
      grid-template-columns:20px 1fr 44px;
      gap:9px;
      align-items:center;
      min-height:42px;
      border-bottom:1px solid #edf1ef;
    }

    .task:last-child{
      border-bottom:0;
    }

    .task-box{
      width:16px;
      height:16px;
      border:1.8px solid #91a098;
      border-radius:4px;
    }

    .task-box.done{
      display:flex;
      align-items:center;
      justify-content:center;
      background:var(--green);
      border-color:var(--green);
      color:#fff;
      font-size:11px;
      font-weight:800;
    }

    .task-text{
      font-size:13px;
      line-height:1.35;
    }

    .task-time{
      text-align:right;
      color:#7d8982;
      font-size:12px;
    }

    .mobile-nav{
      display:none;
    }

    @media (max-width:1260px){
      .stats{
        grid-template-columns:repeat(2,1fr);
      }

      .quick-actions{
        grid-template-columns:repeat(2,1fr);
      }

      .dashboard-grid,
      .bottom-grid{
        grid-template-columns:1fr;
      }
    }

    @media (max-width:860px){
      .sidebar{
        transform:translateX(-100%);
        transition:.24s ease;
        box-shadow:12px 0 30px rgba(0,0,0,.08);
      }

      .sidebar.open{
        transform:translateX(0);
      }

      .main{
        margin-left:0;
        width:100%;
      }

      .mobile-toggle{
        display:flex;
      }

      .topbar{
        padding:0 16px;
      }

      .content{
        padding:18px 14px 84px;
      }

      .events{
        grid-template-columns:1fr;
      }

      .mobile-nav{
        display:grid;
        grid-template-columns:repeat(4,1fr);
        position:fixed;
        left:0;
        right:0;
        bottom:0;
        z-index:90;
        height:62px;
        background:#fff;
        border-top:1px solid var(--border);
        box-shadow:0 -4px 18px rgba(20,50,32,.05);
      }

      .mobile-nav a{
        display:flex;
        flex-direction:column;
        align-items:center;
        justify-content:center;
        gap:4px;
        color:#6d7972;
        font-size:10px;
      }

      .mobile-nav a.active{
        color:var(--green);
        font-weight:700;
      }

      .mobile-nav svg{
        width:20px;
        height:20px;
        fill:none;
        stroke:currentColor;
        stroke-width:1.9;
        stroke-linecap:round;
        stroke-linejoin:round;
      }
    }

    @media (max-width:640px){
      .search-wrap{
        display:none;
      }

      .user-copy,
      .user-arrow,
      .today{
        display:none;
      }

      .welcome h1{
        font-size:27px;
      }

      .welcome p{
        font-size:14px;
      }

      .stats,
      .quick-actions{
        grid-template-columns:1fr;
      }

      .stat{
        min-height:96px;
      }

      .stat-value{
        font-size:32px;
      }

      .section-head h2,
      .panel-head h3{
        font-size:18px;
      }

      .weight-chart{
        height:230px;
      }

      .feed-value{
        font-size:31px;
      }

      .matrix-card{
        display:block;
      }

      .matrix-photo{
        width:100%;
        min-width:100%;
        height:200px;
        margin-bottom:14px;
      }

      .matrix-top{
        display:block;
      }

      .gestation{
        margin-top:14px;
        text-align:left;
        min-width:0;
      }

      .matrix-data{
        grid-template-columns:repeat(2,1fr);
      }

      .task{
        grid-template-columns:20px 1fr 42px;
      }
    }

/* =========================================
   CADASTRO DE ANIMAL
========================================= */

.animais-page-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:24px;
}

.animais-page-head h1{
  font-size:32px;
  font-weight:800;
  letter-spacing:-1px;
}

.animais-page-head p{
  font-size:14px;
  color:var(--muted);
  margin-top:6px;
}

.btn-primary{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 18px;
  border:0;
  border-radius:12px;
  background:var(--green);
  color:#fff;
  font-size:14px;
  font-weight:750;
  box-shadow:0 7px 18px rgba(25,115,71,.18);
  transition:.18s ease;
}

.btn-primary:hover{
  background:var(--green-dark);
  transform:translateY(-1px);
}

.modal-overlay{
  position:fixed;
  inset:0;
  z-index:500;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(17,28,22,.52);
  backdrop-filter:blur(3px);
}

.modal-overlay.open{
  display:flex;
}

.modal-card{
  width:min(760px,100%);
  max-height:calc(100vh - 48px);
  overflow:auto;
  background:#fff;
  border:1px solid var(--border);
  border-radius:20px;
  box-shadow:0 24px 70px rgba(15,33,23,.22);
}

.modal-header{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:22px 24px 18px;
  background:#fff;
  border-bottom:1px solid var(--border);
}

.modal-header h2{
  font-size:23px;
  font-weight:800;
  letter-spacing:-.5px;
}

.modal-header p{
  margin-top:5px;
  color:var(--muted);
  font-size:13px;
}

.modal-close{
  width:38px;
  height:38px;
  flex:none;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  color:#66746c;
  background:#f4f7f5;
  font-size:22px;
  line-height:1;
}

.modal-close:hover{
  background:#edf2ef;
  color:#26362d;
}

.modal-body{
  padding:22px 24px;
}

.form-section + .form-section{
  margin-top:22px;
  padding-top:20px;
  border-top:1px solid #edf1ef;
}

.form-section-title{
  font-size:13px;
  font-weight:800;
  margin-bottom:13px;
  color:#314038;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px;
}

.form-field.full{
  grid-column:1 / -1;
}

.form-field label{
  display:block;
  margin-bottom:6px;
  color:#45544b;
  font-size:12px;
  font-weight:700;
}

.form-field label .required{
  color:#d64d56;
}

.form-control{
  width:100%;
  min-height:44px;
  border:1px solid #dfe6e2;
  border-radius:10px;
  outline:none;
  background:#fbfcfb;
  padding:0 12px;
  color:#25332b;
  font-size:13px;
  transition:.16s ease;
}


.form-control:disabled{
  background:#f0f3f1;
  color:#8a958f;
  cursor:not-allowed;
}

textarea.form-control{
  min-height:96px;
  padding:11px 12px;
  resize:vertical;
}

.form-control:focus{
  background:#fff;
  border-color:#9bc5aa;
  box-shadow:0 0 0 3px rgba(25,115,71,.07);
}

.form-control.invalid{
  border-color:#de7076;
  background:#fff8f8;
}

.field-error{
  display:none;
  margin-top:5px;
  color:#c94f55;
  font-size:11px;
}

.form-field.has-error .field-error{
  display:block;
}

.modal-footer{
  position:sticky;
  bottom:0;
  z-index:2;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:16px 24px;
  background:#fff;
  border-top:1px solid var(--border);
}

.btn-secondary{
  min-height:44px;
  padding:0 16px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  color:#4d5b53;
  font-size:13px;
  font-weight:700;
}

.btn-secondary:hover{
  background:#f5f8f6;
}

.toast{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:800;
  min-width:280px;
  max-width:420px;
  display:none;
  align-items:center;
  gap:11px;
  padding:14px 16px;
  border-radius:12px;
  background:#153e2a;
  color:#fff;
  box-shadow:0 16px 40px rgba(0,0,0,.18);
  font-size:13px;
  font-weight:650;
}

.toast.show{
  display:flex;
}

.toast-icon{
  width:25px;
  height:25px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.16);
  font-weight:800;
}

.demo-note{
  margin-top:8px;
  color:#7d8982;
  font-size:11px;
}

@media(max-width:640px){
  .animais-page-head{
    display:block;
  }

  .animais-page-head .btn-primary{
    width:100%;
    margin-top:16px;
  }

  .modal-overlay{
    padding:0;
    align-items:flex-end;
  }

  .modal-card{
    width:100%;
    max-height:94vh;
    border-radius:20px 20px 0 0;
  }

  .modal-header,
  .modal-body,
  .modal-footer{
    padding-left:16px;
    padding-right:16px;
  }

  .form-grid{
    grid-template-columns:1fr;
  }

  .form-field.full{
    grid-column:auto;
  }

  .modal-footer{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .toast{
    left:12px;
    right:12px;
    bottom:76px;
    min-width:0;
  }
}


/* =========================================
   AUTENTICAÇÃO SUPABASE
========================================= */

.auth-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    radial-gradient(circle at 15% 10%, rgba(25,115,71,.10), transparent 28%),
    radial-gradient(circle at 90% 90%, rgba(25,115,71,.07), transparent 30%),
    #f5f7f6;
}

.auth-shell{
  width:min(980px,100%);
  min-height:590px;
  display:grid;
  grid-template-columns:1.05fr .95fr;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--border);
  border-radius:26px;
  box-shadow:0 28px 80px rgba(18,42,28,.13);
}

.auth-brand-panel{
  position:relative;
  padding:54px 48px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  color:#fff;
  background:
    linear-gradient(145deg, rgba(15,91,53,.97), rgba(25,115,71,.92)),
    #197347;
  overflow:hidden;
}

.auth-brand-panel:before,
.auth-brand-panel:after{
  content:'';
  position:absolute;
  border-radius:50%;
  background:rgba(255,255,255,.07);
}

.auth-brand-panel:before{
  width:320px;
  height:320px;
  right:-120px;
  top:-120px;
}

.auth-brand-panel:after{
  width:220px;
  height:220px;
  left:-90px;
  bottom:-90px;
}

.auth-brand{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:14px;
}

.auth-brand-logo{
  width:58px;
  height:58px;
  flex:none;
}

.auth-brand-name{
  font-size:34px;
  line-height:1;
  font-weight:800;
  letter-spacing:-1px;
}

.auth-brand-name span{
  color:#bfe6cc;
}

.auth-brand-copy{
  position:relative;
  z-index:1;
}

.auth-brand-copy h1{
  max-width:420px;
  font-size:38px;
  line-height:1.08;
  letter-spacing:-1.2px;
  font-weight:800;
}

.auth-brand-copy p{
  max-width:390px;
  margin-top:16px;
  color:rgba(255,255,255,.82);
  font-size:15px;
  line-height:1.6;
}

.auth-benefits{
  position:relative;
  z-index:1;
  display:grid;
  gap:11px;
  margin-top:28px;
}

.auth-benefit{
  display:flex;
  align-items:center;
  gap:10px;
  color:rgba(255,255,255,.92);
  font-size:13px;
}

.auth-benefit-icon{
  width:27px;
  height:27px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:rgba(255,255,255,.12);
  font-weight:800;
}

.auth-form-panel{
  padding:54px 52px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.auth-form-panel h2{
  font-size:30px;
  font-weight:800;
  letter-spacing:-.7px;
}

.auth-form-panel > p{
  margin-top:8px;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}

.auth-migration-notice{
  display:flex;
  align-items:flex-start;
  gap:11px;
  margin-top:18px;
  padding:13px 14px;
  border:1px solid #cfe3d7;
  border-radius:13px;
  background:linear-gradient(135deg,#f2faf5,#f8fcf9);
  color:#315b43;
  box-shadow:0 6px 18px rgba(25,115,71,.06);
}

.auth-migration-icon{
  width:28px;
  height:28px;
  min-width:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#dff2e6;
  color:var(--green);
  font-size:13px;
  font-weight:900;
}

.auth-migration-notice strong{
  display:block;
  margin:1px 0 4px;
  color:#174f31;
  font-size:12px;
}

.auth-migration-notice p{
  margin:0;
  color:#5b6f61;
  font-size:11px;
  line-height:1.48;
}

.auth-form{
  margin-top:24px;
}

.auth-field{
  margin-bottom:17px;
}

.auth-field label{
  display:block;
  margin-bottom:7px;
  color:#425047;
  font-size:12px;
  font-weight:750;
}

.auth-input-wrap{
  position:relative;
}

.auth-input-icon{
  position:absolute;
  left:13px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  color:#7f8c84;
  pointer-events:none;
}

.auth-input-icon svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.auth-input{
  width:100%;
  height:48px;
  padding:0 13px 0 42px;
  border:1px solid #dce5df;
  border-radius:12px;
  outline:none;
  background:#fbfcfb;
  color:#243229;
  font-size:14px;
  transition:.16s ease;
}

.auth-input:focus{
  background:#fff;
  border-color:#9bc5aa;
  box-shadow:0 0 0 4px rgba(25,115,71,.07);
}

.auth-password-toggle{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  border-radius:8px;
  color:#718078;
  font-size:11px;
  font-weight:700;
}

.auth-submit{
  width:100%;
  height:48px;
  margin-top:5px;
  border:0;
  border-radius:12px;
  background:var(--green);
  color:#fff;
  font-size:14px;
  font-weight:800;
  box-shadow:0 8px 20px rgba(25,115,71,.18);
}

.auth-submit:hover{
  background:var(--green-dark);
}

.auth-submit:disabled{
  opacity:.68;
  cursor:wait;
}

.auth-error{
  display:none;
  margin:16px 0 0;
  padding:11px 12px;
  border:1px solid #f2c4c8;
  border-radius:10px;
  background:#fff4f5;
  color:#b6424a;
  font-size:12px;
  line-height:1.4;
}

.auth-error.show{
  display:block;
}

.auth-footnote{
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid #edf1ef;
  color:#7a8780;
  font-size:11px;
  line-height:1.5;
}


.auth-account-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:14px;
}

.auth-account-secondary{
  min-height:46px;
  border:1px solid #cfe0d6;
  border-radius:12px;
  background:#f5fbf7;
  color:var(--green);
  font-size:13px;
  font-weight:800;
}

.auth-account-secondary:hover{
  background:#eaf6ef;
  border-color:#afd0bd;
}

.auth-signup-owner{
  display:none;
  margin-top:14px;
  padding:16px;
  border:1px solid #d9e7de;
  border-radius:14px;
  background:#f8fbf9;
}

.auth-signup-owner.open{
  display:block;}

.auth-signup-owner h3{
  font-size:15px;
  margin-bottom:4px;
}

.auth-signup-owner > p{
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
  margin-bottom:13px;
}

.auth-signup-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.auth-signup-grid .auth-field{
  margin-bottom:0;
}

.auth-signup-grid .full{
  grid-column:1 / -1;
}

@media(max-width:560px){
  .auth-account-actions,
  .auth-signup-grid{
    grid-template-columns:1fr;
  }

  .auth-signup-grid .full{
    grid-column:auto;
  }
}


.auth-recovery-link{
  width:100%;
  min-height:38px;
  margin-top:8px;
  border:0;
  background:transparent;
  color:var(--green);
  font-size:12px;
  font-weight:800;
  text-align:center;
}

.auth-recovery-link:hover{
  text-decoration:underline;
}

.auth-recovery-box{
  display:none;
  margin-top:14px;
  padding:16px;
  border:1px solid #d9e7de;
  border-radius:14px;
  background:#f8fbf9;
}

.auth-recovery-box.open{
  display:block;
}

.auth-recovery-box h3{
  font-size:15px;
  margin-bottom:4px;
}

.auth-recovery-box > p{
  margin-bottom:12px;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}

.user-menu-wrap{
  position:relative;
}

.top-user{
  cursor:pointer;
}

.user-dropdown{
  position:absolute;
  right:0;
  top:50px;
  z-index:300;
  width:220px;
  display:none;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--border);
  border-radius:13px;
  box-shadow:0 16px 38px rgba(22,42,31,.13);
}

.user-dropdown.open{
  display:block;
}

.user-dropdown-head{
  padding:13px 14px;
  border-bottom:1px solid #edf1ef;
}

.user-dropdown-head strong{
  display:block;
  font-size:12px;
}

.user-dropdown-head span{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:10px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.user-dropdown button{
  width:100%;
  padding:12px 14px;
  text-align:left;
  color:#9d343a;
  background:#fff;
  font-size:12px;
  font-weight:700;
}

.user-dropdown button:hover{
  background:#fff5f5;
}

.auth-loading{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f5f7f6;
  color:#56655c;
  font-size:14px;
}

.auth-spinner{
  width:26px;
  height:26px;
  margin-right:10px;
  border:3px solid #d9e5dd;
  border-top-color:var(--green);
  border-radius:50%;
  animation:authSpin .8s linear infinite;
}

@keyframes authSpin{
  to{transform:rotate(360deg)}
}

@media(max-width:780px){
  .auth-shell{
    grid-template-columns:1fr;
    min-height:0;
    max-width:520px;
  }

  .auth-brand-panel{
    min-height:235px;
    padding:30px 28px;
  }

  .auth-brand-copy h1{
    font-size:28px;
  }

  .auth-brand-copy p,
  .auth-benefits{
    display:none;
  }

  .auth-form-panel{
    padding:34px 28px 38px;
  }
}

@media(max-width:480px){
  .auth-screen{
    padding:0;
    background:#fff;
  }

  .auth-shell{
    min-height:100vh;
    border:0;
    border-radius:0;
    box-shadow:none;
  }

  .auth-brand-panel{
    border-radius:0 0 24px 24px;
  }

  .auth-form-panel{
    padding:30px 20px 38px;
  }
}


.animals-state{
  min-height:220px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:28px;
  background:#fff;
  border:1px dashed #ccd9d1;
  border-radius:16px;
  color:#64736a;
}

.animals-state-icon{
  width:54px;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:12px;
  border-radius:16px;
  background:var(--green-soft);
  font-size:25px;
}

.animals-state strong{
  color:#2e3c34;
  font-size:16px;
  margin-bottom:5px;
}

.animals-state span{
  max-width:440px;
  font-size:12px;
  line-height:1.5;
}

.animal-status.leitao{
  color:#725b19;
  background:#fff5cf;
}

.animal-status.terminacao{
  color:#72501a;
  background:#fff0d7;
}


/* =========================================
   FICHA DO ANIMAL
========================================= */

.animal-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:20px;
}

.animal-detail-head-left{
  display:flex;
  align-items:flex-start;
  gap:14px;
}

.back-button{
  width:42px;
  height:42px;
  flex:none;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--border);
  border-radius:11px;
  background:#fff;
  color:#4f5d55;
}

.back-button:hover{
  background:#f4f7f5;
}

.back-button svg{
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.animal-detail-title h1{
  font-size:30px;
  font-weight:800;
  letter-spacing:-.8px;
}

.animal-detail-title p{
  margin-top:5px;
  color:var(--muted);
  font-size:13px;
}

.animal-detail-actions{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
}

.detail-hero{
  display:grid;
  grid-template-columns:170px 1fr;
  gap:20px;
  padding:20px;
  margin-bottom:16px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow);
}

.detail-photo{
  height:150px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#f9e6e2,#fff7f5);
  color:#c97e76;
  overflow:hidden;
}

.detail-photo.male{
  background:linear-gradient(135deg,#eaf3fa,#f7fbfe);
  color:#5d8cae;
}

.detail-photo.young{
  background:linear-gradient(135deg,#edf7ee,#f8fcf8);
  color:#5d9b6d;
}

.detail-photo svg{
  width:112px;
  height:92px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.detail-hero-main{
  min-width:0;
}

.detail-hero-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.detail-hero-name{
  font-size:24px;
  font-weight:800;
  letter-spacing:-.5px;
}

.detail-hero-sub{
  margin-top:5px;
  color:var(--muted);
  font-size:13px;
}

.detail-meta{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-top:20px;
}

.detail-meta-item{
  min-width:0;
  padding:12px 13px;
  border-radius:12px;
  background:#f7f9f8;
}

.detail-meta-item small{
  display:block;
  margin-bottom:4px;
  color:#7b8881;
  font-size:11px;
}

.detail-meta-item strong{
  display:block;
  color:#29372f;
  font-size:13px;
  line-height:1.35;
  overflow-wrap:anywhere;
}

.detail-tabs{
  display:flex;
  gap:6px;
  padding:6px;
  margin-bottom:16px;
  overflow:auto;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow);
}

.detail-tab{
  flex:none;
  min-height:38px;
  padding:0 14px;
  border-radius:9px;
  color:#5d6a62;
  font-size:12px;
  font-weight:700;
}

.detail-tab:hover{
  background:#f3f7f4;
  color:var(--green);
}

.detail-tab.active{
  background:var(--green);
  color:#fff;
}

.detail-tab-panel{
  display:none;
}

.detail-tab-panel.active{
  display:block;
}

.detail-grid{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:16px;
}

.detail-card{
  padding:18px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
}

.detail-card h3{
  margin-bottom:14px;
  font-size:18px;
  font-weight:800;
  letter-spacing:-.35px;
}

.detail-info-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.detail-info{
  padding:12px;
  border-radius:11px;
  background:#f7f9f8;
}

.detail-info small{
  display:block;
  color:#7b8881;
  font-size:11px;
  margin-bottom:4px;
}

.detail-info strong{
  display:block;
  color:#2b3931;
  font-size:13px;
  line-height:1.4;
  overflow-wrap:anywhere;
}

.detail-notes{
  min-height:118px;
  padding:14px;
  border-radius:12px;
  background:#f7f9f8;
  color:#526159;
  font-size:13px;
  line-height:1.55;
  white-space:pre-wrap;
}

.detail-empty{
  min-height:210px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:28px;
  background:#fff;
  border:1px dashed #ccd9d1;
  border-radius:16px;
  color:#65736b;
}

.detail-empty-icon{
  width:52px;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:11px;
  border-radius:15px;
  background:var(--green-soft);
  font-size:23px;
}

.detail-empty strong{
  margin-bottom:5px;
  color:#2e3c34;
  font-size:15px;
}

.detail-empty span{
  max-width:480px;
  font-size:12px;
  line-height:1.5;
}

@media(max-width:920px){
  .detail-meta{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .detail-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:640px){
  .animal-detail-head{
    display:block;
  }

  .animal-detail-head-left{
    align-items:flex-start;
  }

  .animal-detail-actions{
    margin-top:14px;
  }

  .detail-hero{
    grid-template-columns:1fr;
  }

  .detail-photo{
    height:190px;
  }

  .detail-meta,
  .detail-info-list{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:430px){
  .detail-meta,
  .detail-info-list{
    grid-template-columns:1fr;
  }
}


/* =========================================
   EDITAR ANIMAL
========================================= */

.edit-animal-note{
  margin-top:8px;
  color:#7b8881;
  font-size:11px;
  line-height:1.45;
}

.danger-zone{
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid #f1dddd;
}

.danger-zone-title{
  margin-bottom:8px;
  color:#a23a41;
  font-size:12px;
  font-weight:800;
}

.btn-danger-soft{
  min-height:42px;
  padding:0 14px;
  border:1px solid #efc7ca;
  border-radius:10px;
  background:#fff7f7;
  color:#b44248;
  font-size:12px;
  font-weight:750;
}

.btn-danger-soft:hover{
  background:#fff0f0;
}


/* =========================================
   EXCLUIR FICHA DO ANIMAL
========================================= */

.btn-danger{
  min-height:44px;
  padding:0 16px;
  border:1px solid #d95057;
  border-radius:10px;
  background:#c93f47;
  color:#fff;
  font-size:13px;
  font-weight:800;
}

.btn-danger:hover{
  background:#ad3138;
}

.delete-warning{
  display:flex;
  gap:12px;
  padding:14px;
  margin-bottom:16px;
  border:1px solid #f0c9cc;
  border-radius:12px;
  background:#fff6f6;
}

.delete-warning-icon{
  width:34px;
  height:34px;
  min-width:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#ffe4e6;
  color:#b43c43;
  font-size:17px;
  font-weight:900;
}

.delete-warning strong{
  display:block;
  margin-bottom:4px;
  color:#8d3036;
  font-size:13px;
}

.delete-warning p{
  color:#79585a;
  font-size:12px;
  line-height:1.5;
}

.delete-confirm-code{
  font-weight:800;
  color:#9e343a;
}


/* =========================================
   MÓDULO LOTES
========================================= */

.lotes-page-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:22px;
}

.lotes-page-head h1{
  font-size:32px;
  font-weight:800;
  letter-spacing:-1px;
}

.lotes-page-head p{
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
}

.lotes-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-bottom:18px;
}

.lote-stat{
  padding:17px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:15px;
  box-shadow:var(--shadow);
}

.lote-stat small{
  display:block;
  color:#718078;
  font-size:11px;
  margin-bottom:5px;
}

.lote-stat strong{
  font-size:28px;
  font-weight:800;
  letter-spacing:-.6px;
}

.lotes-list{
  display:grid;
  gap:12px;
}

.lote-card{
  display:grid;
  grid-template-columns:52px 1fr auto;
  gap:14px;
  align-items:center;
  padding:16px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:15px;
  box-shadow:var(--shadow);
}

.lote-card-icon{
  width:52px;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  background:var(--green-soft);
  color:var(--green);
  font-size:22px;
}

.lote-card h3{
  font-size:17px;
  font-weight:800;
  margin-bottom:4px;
}

.lote-card p{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.lote-card-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:9px;
}

.lote-chip{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:0 9px;
  border-radius:999px;
  background:#f1f6f3;
  color:#526159;
  font-size:10px;
  font-weight:700;
}

.lote-chip.inativo{
  background:#fff0f1;
  color:#a84047;
}

.lote-card-actions{
  display:flex;
  gap:8px;
}

.lote-card-actions button{
  min-height:38px;
  padding:0 12px;
  border:1px solid var(--border);
  border-radius:9px;
  background:#fff;
  color:#4c5a52;
  font-size:11px;
  font-weight:700;
}

.lote-card-actions button:hover{
  background:#f5f8f6;
  color:var(--green);
}

@media(max-width:760px){
  .lotes-page-head{
    display:block;
  }

  .lotes-page-head .btn-primary{
    width:100%;
    margin-top:15px;
  }

  .lotes-stats{
    grid-template-columns:1fr;
  }

  .lote-card{
    grid-template-columns:46px 1fr;
  }

  .lote-card-actions{
    grid-column:1 / -1;
    justify-content:flex-end;
  }
}


/* =========================================
   PESAGENS + MOVIMENTAÇÃO + PAINEL REAL
========================================= */

.quick{
  cursor:pointer;
}

.quick:hover{
  transform:translateY(-1px);
  border-color:#c8d8cf;
}

.dashboard-real-note{
  color:#7a8780;
  font-size:11px;
  margin-top:5px;
}

.weight-empty-note{
  display:none;
  align-items:center;
  justify-content:center;
  min-height:150px;
  text-align:center;
  color:#748179;
  font-size:12px;
  padding:24px;
}

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

.pesagem-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:center;
  padding:13px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
}

.pesagem-row strong{
  display:block;
  font-size:13px;
  color:#2c3931;
}

.pesagem-row span{
  display:block;
  margin-top:3px;
  color:#758179;
  font-size:11px;
}

.pesagem-value{
  text-align:right;
  font-size:18px;
  font-weight:800;
  color:var(--green);
}

.move-animal-box{
  padding:14px;
  border:1px solid #dfe8e2;
  border-radius:12px;
  background:#f8faf9;
  margin-bottom:16px;
}

.move-animal-box strong{
  display:block;
  color:#2d3a32;
  font-size:14px;
}

.move-animal-box span{
  display:block;
  margin-top:4px;
  color:#77847c;
  font-size:11px;
}

@media(max-width:600px){
  .pesagem-row{
    grid-template-columns:1fr;
  }

  .pesagem-value{
    text-align:left;
  }
}


/* =========================================
   REPRODUÇÃO / GESTAÇÃO
========================================= */
.repro-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:20px;
}
.repro-head h1{
  font-size:32px;
  font-weight:800;
  letter-spacing:-1px;
}
.repro-head p{
  margin-top:6px;
  color:var(--muted);
  font-size:14px;
}
.repro-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.repro-stat{
  padding:16px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:15px;
  box-shadow:var(--shadow);
}
.repro-stat small{
  display:block;  color:#718078;
  font-size:11px;
  margin-bottom:5px;
}
.repro-stat strong{
  font-size:26px;
  font-weight:800;
}
.gestacao-list{
  display:grid;
  gap:12px;
}
.gestacao-card{
  padding:16px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:15px;
  box-shadow:var(--shadow);
}
.gestacao-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
}
.gestacao-card h3{
  font-size:17px;
  font-weight:800;
}
.gestacao-card p{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
}
.gestacao-meta{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}
.gestacao-meta div{
  padding:10px;
  border-radius:10px;
  background:#f7f9f8;
}
.gestacao-meta small{
  display:block;
  color:#7a867f;
  font-size:10px;
  margin-bottom:4px;
}
.gestacao-meta strong{
  display:block;
  font-size:12px;
  color:#2c3931;
}
.gestacao-progress{
  margin-top:14px;
}
.gestacao-progress-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
  font-size:11px;
  color:#66736b;
}
.gestacao-progress-bar{
  height:8px;
  border-radius:999px;
  background:#edf2ef;
  overflow:hidden;
}
.gestacao-progress-fill{
  height:100%;
  border-radius:inherit;
  background:var(--green);
}
.repro-badge{
  display:inline-flex;
  min-height:26px;
  align-items:center;
  padding:0 9px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
}
.repro-badge.confirmada{background:#e8f6ed;color:#187440;}
.repro-badge.aguardando{background:#fff3d9;color:#9a6811;}
.repro-badge.encerrada{background:#eef1ef;color:#5f6b64;}
.repro-badge.perda{background:#fff0f0;color:#b54147;}
.calc-preview{
  padding:13px;
  border-radius:11px;
  background:#f4f8f5;
  border:1px solid #dfe9e2;
  margin-top:12px;
  font-size:12px;
  color:#526159;
}
.calc-preview strong{color:#1b6f43;}
@media(max-width:900px){
  .repro-stats{grid-template-columns:repeat(2,1fr);}
  .gestacao-meta{grid-template-columns:repeat(2,1fr);}
}
@media(max-width:560px){
  .repro-head{display:block;}
  .repro-head .btn-primary{width:100%;margin-top:14px;}
  .repro-stats{grid-template-columns:1fr;}
  .gestacao-meta{grid-template-columns:1fr 1fr;}
}


/* =========================================
   PROTEÇÃO DE MATRIZ + DIAGNÓSTICO
========================================= */
.gestacao-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid #edf1ef;
}
.gestacao-actions .btn-secondary,
.gestacao-actions .btn-primary{
  min-height:38px;
  padding:0 13px;
  font-size:12px;
}
.btn-warning{
  min-height:38px;
  padding:0 13px;
  border:1px solid #f0d5a5;
  border-radius:10px;
  background:#fff8ea;
  color:#8b6117;
  font-size:12px;
  font-weight:700;
}
.btn-warning:hover{
  background:#fff1d0;
}
.form-control option:disabled{
  color:#929b96;
}


/* =========================================
   PARTO + NINHADAS
========================================= */
.maternidade-panel{
  margin-top:18px;
}
.maternidade-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.maternidade-panel-head h2{
  font-size:18px;
  font-weight:800;
}
.ninhadas-grid{
  display:grid;
  gap:12px;
}
.ninhada-card{
  padding:16px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:15px;
  box-shadow:var(--shadow);
}
.ninhada-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.ninhada-top h3{
  font-size:16px;
  font-weight:800;
}
.ninhada-top p{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
}
.ninhada-meta{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}
.ninhada-meta div{
  padding:10px;
  border-radius:10px;
  background:#f7f9f8;
}
.ninhada-meta small{
  display:block;
  color:#7a867f;
  font-size:10px;
  margin-bottom:4px;
}
.ninhada-meta strong{
  display:block;
  font-size:12px;
  color:#2c3931;
}
.parto-total{
  padding:12px;
  border:1px solid #e2e9e4;
  border-radius:11px;
  background:#f7faf8;
  margin-top:12px;
  font-size:12px;
  color:#526159;
}
.parto-total strong{
  color:#176b40;
}
@media(max-width:700px){
  .ninhada-meta{grid-template-columns:repeat(2,minmax(0,1fr));}
}


/* =========================================
   MATERNIDADE
========================================= */
.maternidade-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.maternidade-head h1{font-size:28px;font-weight:800;}
.maternidade-head p{margin-top:4px;color:var(--muted);font-size:13px;}
.maternidade-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.maternidade-kpi,
.maternidade-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
}
.maternidade-kpi{padding:15px;}
.maternidade-kpi small{display:block;color:var(--muted);font-size:11px;margin-bottom:5px;}
.maternidade-kpi strong{font-size:24px;}
.maternidade-card{padding:18px;margin-bottom:14px;}
.maternidade-card-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.maternidade-card h3{font-size:17px;font-weight:800;}
.maternidade-card .sub{font-size:12px;color:var(--muted);margin-top:4px;}
.maternidade-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}
.maternidade-info{
  background:#f7f9f8;
  border-radius:10px;
  padding:10px;
}
.maternidade-info small{display:block;color:#7a867f;font-size:10px;margin-bottom:4px;}
.maternidade-info strong{font-size:12px;display:block;}
.maternidade-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid #edf1ef;
}
.maternidade-actions button{min-height:38px;}
.ocorrencias-mini{
  margin-top:12px;
  display:grid;
  gap:7px;
}
.ocorrencia-mini{
  display:flex;
  justify-content:space-between;
  gap:12px;
  background:#fafbfa;
  border:1px solid #edf1ef;
  border-radius:9px;
  padding:9px 10px;
  font-size:11px;
}
.ocorrencia-mini span:last-child{font-weight:700;}
.badge-mat{
  display:inline-flex;
  padding:5px 9px;
  border-radius:999px;
  background:#eaf7ef;
  color:#166c3f;
  font-size:10px;
  font-weight:800;
}
.badge-encerrada{
  display:inline-flex;
  padding:5px 9px;
  border-radius:999px;
  background:#f1f3f2;
  color:#66736c;
  font-size:10px;
  font-weight:800;
}
@media(max-width:1000px){
  .maternidade-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  .maternidade-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:600px){
  .maternidade-kpis{grid-template-columns:1fr 1fr;}
  .maternidade-grid{grid-template-columns:1fr 1fr;}
}


/* =========================================
   LEITÕES + FASES PRODUTIVAS
========================================= */
.leitoes-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:18px;
}
.leitoes-head h1{font-size:28px;font-weight:800;}
.leitoes-head p{margin-top:4px;color:var(--muted);font-size:13px;}
.leitoes-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.leitoes-kpi,
.leitao-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
}
.leitoes-kpi{padding:15px;}
.leitoes-kpi small{display:block;color:var(--muted);font-size:11px;margin-bottom:5px;}
.leitoes-kpi strong{font-size:24px;}
.leitao-card{padding:18px;margin-bottom:14px;}
.leitao-top{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}
.leitao-top h3{font-size:17px;font-weight:800;}
.leitao-sub{margin-top:4px;color:var(--muted);font-size:12px;}
.fase-badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#eaf7ef;
  color:#176b40;
  font-size:11px;
  font-weight:800;
}
.leitao-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}
.leitao-info{
  padding:10px;
  border-radius:10px;
  background:#f7f9f8;
}
.leitao-info small{
  display:block;
  color:#7a867f;
  font-size:10px;
  margin-bottom:4px;
}
.leitao-info strong{
  display:block;
  font-size:12px;
}
.fases-preview{
  display:grid;
  gap:8px;
  margin-top:14px;
}
.fase-preview-row{
  display:grid;
  grid-template-columns:minmax(150px,1fr) 1fr 1fr;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border:1px solid #e6ebe8;
  border-radius:10px;
  background:#fafbfa;
}
.fase-preview-row strong{font-size:12px;}
.fase-preview-row span{font-size:12px;color:#617068;}
.config-fases-note{
  margin-top:12px;
  padding:11px 12px;
  border-radius:10px;
  background:#f4f8f5;
  color:#526159;
  font-size:12px;
}
@media(max-width:1000px){
  .leitoes-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  .leitao-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:650px){
  .leitoes-head{flex-direction:column;}
  .leitoes-kpis{grid-template-columns:1fr 1fr;}
  .leitao-grid{grid-template-columns:1fr 1fr;}
  .fase-preview-row{grid-template-columns:1fr;}
}


/* =========================================
   FASE PRODUTIVA X LOTE FÍSICO
========================================= */
.fase-lote-alerta{
  margin-top:12px;
  padding:11px 12px;
  border:1px solid #f0d5a5;
  border-radius:10px;
  background:#fff8ea;
  color:#7b5817;
  font-size:12px;
  line-height:1.45;
}
.fase-lote-ok{
  margin-top:12px;
  padding:10px 12px;
  border:1px solid #cfe6d7;
  border-radius:10px;
  background:#f1faf4;
  color:#276743;
  font-size:12px;
}
.leitao-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid #edf1ef;
}


/* =========================================
   LOTES + PESAGENS + ALIMENTAÇÃO
========================================= */
.modulo-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.modulo-head h1{font-size:28px;font-weight:800;}
.modulo-head p{margin-top:4px;color:var(--muted);font-size:13px;}
.modulo-actions{display:flex;gap:8px;flex-wrap:wrap;}

.modulo-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.modulo-kpi{
  background:white;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:15px;
}
.modulo-kpi small{display:block;color:var(--muted);font-size:11px;margin-bottom:5px;}
.modulo-kpi strong{font-size:24px;}

.lote-card-enhanced{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:17px;
  margin-bottom:12px;
}
.lote-card-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.lote-card-top h3{font-size:17px;font-weight:800;}
.lote-card-sub{margin-top:3px;color:var(--muted);font-size:12px;}
.lote-resumo-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px;
  margin-top:13px;
}
.lote-resumo-box{
  background:#f7f9f8;
  border-radius:10px;
  padding:10px;
}
.lote-resumo-box small{display:block;color:#77847d;font-size:10px;margin-bottom:4px;}
.lote-resumo-box strong{font-size:12px;display:block;}
.lote-grupos{
  margin-top:12px;
  display:grid;
  gap:7px;
}
.lote-grupo-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 10px;
  border:1px solid #e9eeeb;
  border-radius:9px;
  background:#fbfcfb;
  font-size:11px;
}
.lote-card-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding-top:13px;
  margin-top:13px;
  border-top:1px solid #edf1ef;
}

.registro-lista{
  display:grid;
  gap:10px;
}
.registro-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow);
  padding:14px 16px;
}
.registro-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.registro-top h3{font-size:14px;font-weight:800;}
.registro-sub{font-size:11px;color:var(--muted);margin-top:3px;}
.registro-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:11px;
}
.registro-box{
  background:#f7f9f8;
  border-radius:9px;
  padding:9px;
}
.registro-box small{display:block;color:#7a867f;font-size:10px;margin-bottom:3px;}
.registro-box strong{font-size:12px;}

.lote-detail-summary{
  padding:12px;
  background:#f6f9f7;
  border:1px solid #e5ece8;
  border-radius:11px;
  margin-bottom:12px;
}
.lote-detail-summary strong{font-size:14px;}
.lote-detail-summary p{font-size:11px;color:var(--muted);margin-top:4px;}

.select-help{
  margin-top:6px;
  color:var(--muted);
  font-size:10px;
}

@media(max-width:1050px){
  .modulo-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  .lote-resumo-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .registro-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:650px){
  .modulo-head{flex-direction:column;}
  .modulo-kpis{grid-template-columns:1fr 1fr;}
  .lote-resumo-grid,.registro-grid{grid-template-columns:1fr 1fr;}
}




/* =========================================
   SANIDADE
========================================= */
.san-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:16px 0;
}
.san-tab{
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  border-radius:10px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
}
.san-tab.active{
  background:var(--green);
  color:#fff;
  border-color:var(--green);
}
.san-panel{display:none;}
.san-panel.active{display:block;}
.san-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}
.san-section-title{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-bottom:14px;
}
.san-section-title h3{margin:0;}
.san-section-title span{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}
.san-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.san-card{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  background:#fff;
}
.san-card-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.san-card h4{
  margin:0;
  font-size:13px;
}
.san-meta{
  color:var(--muted);
  font-size:10px;
  margin-top:4px;
}
.san-card-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}
.san-info{
  background:#f7faf8;
  border-radius:9px;
  padding:8px;
}
.san-info small{
  display:block;
  color:var(--muted);
  font-size:9px;
}
.san-info strong{
  display:block;
  margin-top:2px;
  font-size:11px;
}
.san-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 8px;
  background:#e8f5ec;
  color:#18733d;
  font-size:9px;
  font-weight:800;
  white-space:nowrap;
}
.san-badge.warn{
  background:#fff4dc;
  color:#8a5b00;
}
.san-badge.danger{
  background:#fde9e9;
  color:#a33131;
}
.san-badge.neutral{
  background:#eef2ef;
  color:#5b6b61;
}
.san-empty{
  border:1px dashed var(--border);
  border-radius:12px;
  padding:18px;
  color:var(--muted);
  text-align:center;
  background:#fbfcfb;
}
.san-actions{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:10px;
}
.san-subbox{
  border:1px solid var(--border);
  border-radius:12px;
  padding:14px;
  margin-top:14px;
  background:#f9fbfa;
}
.san-subbox-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
}
.san-help{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:12px;
}
.san-etapas-resumo{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  min-height:40px;
  padding:8px 0;
}
.san-subbox-head span{
  color:var(--muted);
  font-size:10px;
}
.btn-small{
  padding:8px 11px !important;
  font-size:10px !important;
}
@media(max-width:900px){
  .san-grid-2{grid-template-columns:1fr;}
  .san-card-grid{grid-template-columns:1fr 1fr;}
}
@media(max-width:560px){
  .san-card-grid{grid-template-columns:1fr;}
  .san-section-title{align-items:flex-start;flex-direction:column;}
}

/* =========================================
   ESTOQUE DE RAÇÕES
========================================= */
.racao-stock-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.racao-stock-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  box-shadow:0 6px 18px rgba(16,45,28,.04);
}
.racao-stock-card h3{margin:0;font-size:14px;}
.racao-stock-card small{display:block;color:var(--muted);margin-top:3px;}
.racao-stock-numbers{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:12px;
}
.racao-stock-box{
  background:#f7faf8;
  border-radius:10px;
  padding:9px 10px;
}
.racao-stock-box span{display:block;color:var(--muted);font-size:9px;}
.racao-stock-box strong{display:block;margin-top:2px;font-size:13px;}
.racao-stock-empty{
  border:1px dashed var(--border);
  border-radius:14px;
  padding:20px;
  text-align:center;
  color:var(--muted);
  background:#fff;
}
.racao-compat-note{
  margin-top:7px;
  padding:8px 10px;
  border-radius:9px;
  background:#f3f7f4;
  color:#4b6253;
  font-size:10px;
}
@media(max-width:900px){
  .racao-stock-grid{grid-template-columns:1fr;}
}

/* =========================================
   CONFIGURAÇÃO DE RAÇÕES
========================================= */
.racao-config-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.racao-panel{
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:14px;
}
.racao-panel h3{
  font-size:15px;
  margin-bottom:4px;
}
.racao-panel p{
  font-size:11px;
  color:var(--muted);
  margin-bottom:12px;
}
.racao-toolbar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.racao-list{
  display:grid;
  gap:8px;
  max-height:310px;
  overflow:auto;
}
.racao-item{
  border:1px solid #e7ece9;
  background:#fafcfb;
  border-radius:10px;
  padding:10px;
}
.racao-item-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.racao-item strong{
  font-size:12px;
}
.racao-item small{
  display:block;
  color:var(--muted);
  margin-top:3px;
  font-size:10px;
}
.racao-chip{
  font-size:9px;
  padding:4px 7px;
  border-radius:999px;
  background:#e8f5ed;
  color:#17683c;
  font-weight:700;
  white-space:nowrap;
}
.racao-chip.pronta{
  background:#eef2ff;
  color:#4053a7;
}
.formula-resumo{
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #dce8e1;
  background:#f7fbf8;
  font-size:11px;
}
.formula-resumo.alerta{
  border-color:#efcf9a;
  background:#fff8e9;
}
.formula-ingredientes-editor{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.formula-ing-row{
  display:grid;
  grid-template-columns:1fr 140px 40px;
  gap:8px;
  align-items:end;
}
.formula-ing-row button{
  height:40px;
}
.config-tabs{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.config-tab{
  border:1px solid var(--border);
  background:#fff;
  border-radius:9px;
  padding:8px 11px;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
.config-tab.ativo{
  background:var(--green);
  color:#fff;
  border-color:var(--green);
}
@media(max-width:800px){
  .racao-config-grid{grid-template-columns:1fr;}
  .formula-ing-row{grid-template-columns:1fr 110px 40px;}
}


/* ===== AGENDA ===== */
.agenda-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0 18px;}
.agenda-filter{border:1px solid var(--border);background:#fff;color:var(--text);border-radius:10px;padding:9px 13px;font-weight:700;cursor:pointer;}
.agenda-filter.active{background:var(--green);border-color:var(--green);color:#fff;}

.agenda-section{margin:0 0 22px;}
.agenda-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:0 2px;}
.agenda-section-head h2{margin:0;font-size:17px;}
.agenda-section-head span{color:var(--muted);font-size:12px;}
.agenda-section.atrasados .agenda-section-head h2{color:#a73b3b;}
.agenda-section.hoje .agenda-section-head h2{color:var(--green);}
.agenda-empty-mini{background:#fff;border:1px dashed var(--border);color:var(--muted);border-radius:12px;padding:14px 16px;font-size:12px;}

.agenda-day{margin-bottom:16px;}
.agenda-day-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px;padding:0 2px;}
.agenda-day-title h3{margin:0;font-size:15px;}
.agenda-day-title span{color:var(--muted);font-size:12px;}
.agenda-item{background:#fff;border:1px solid var(--border);border-radius:14px;padding:14px 16px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between;gap:14px;box-shadow:var(--shadow);}
.agenda-item-main{display:flex;align-items:flex-start;gap:12px;min-width:0;}
.agenda-dot{width:10px;height:10px;border-radius:50%;background:var(--green);margin-top:6px;flex:0 0 auto;}
.agenda-dot.warn{background:#d89a21}.agenda-dot.danger{background:#c94b4b}.agenda-dot.blue{background:#4c79c9}
.agenda-copy h4{margin:0 0 4px;font-size:14px}.agenda-copy p{margin:0;color:var(--muted);font-size:12px;line-height:1.45}
.agenda-side{text-align:right;flex:0 0 auto}.agenda-side strong{display:block;font-size:12px}.agenda-side span{display:block;color:var(--muted);font-size:11px;margin-top:3px}
@media(max-width:700px){.agenda-item{align-items:flex-start;flex-direction:column}.agenda-side{text-align:left}}


/* =========================================
   RELATÓRIO DA NINHADA
========================================= */
.rel-ninhada-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px;}
.rel-ninhada-head h3{margin:0;font-size:20px;}
.rel-ninhada-head p{margin:4px 0 0;color:var(--muted);font-size:12px;}
.rel-ninhada-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px;}
.rel-ninhada-box{background:#f7faf8;border:1px solid #e7ede9;border-radius:11px;padding:10px;}
.rel-ninhada-box small{display:block;color:var(--muted);font-size:10px;margin-bottom:4px;}
.rel-ninhada-box strong{display:block;font-size:13px;}
.rel-section{margin-top:18px;}
.rel-section h4{margin:0 0 9px;font-size:14px;}
.rel-table{width:100%;border-collapse:collapse;font-size:11px;}.rel-table th,.rel-table td{padding:8px 9px;border-bottom:1px solid #edf1ef;text-align:left;vertical-align:top;}
.rel-table th{color:#64736a;font-size:10px;background:#fafcfb;}
.rel-empty{padding:13px;border:1px dashed var(--border);border-radius:10px;color:var(--muted);font-size:11px;background:#fbfcfb;}
@media(max-width:760px){.rel-ninhada-head{flex-direction:column}.rel-ninhada-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}


/* =========================================
   RELATÓRIOS - NINHADAS
========================================= */
.rel-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:20px;}
.rel-page-head h1{font-size:32px;font-weight:800;letter-spacing:-1px;}
.rel-page-head p{margin-top:6px;color:var(--muted);font-size:14px;}
.rel-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px;}
.rel-tab{min-height:38px;padding:0 14px;border:1px solid var(--border);border-radius:10px;background:#fff;color:#536158;font-size:12px;font-weight:700;}
.rel-tab.active{background:var(--green);border-color:var(--green);color:#fff;}
.rel-list{display:grid;gap:12px;}
.rel-card{background:#fff;border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);padding:16px;}
.rel-card-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;}
.rel-card-top h3{font-size:17px;margin:0 0 4px;}
.rel-card-top p{font-size:11px;color:var(--muted);margin:0;}
.rel-card-status{padding:6px 10px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap;background:#e7f6ed;color:#166b41;}
.rel-card-status.encerrada{background:#f0f2f1;color:#6c7871;}
.rel-card-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin-top:13px;}
.rel-card-info{background:#f7faf8;border-radius:10px;padding:9px 10px;}
.rel-card-info small{display:block;color:var(--muted);font-size:9px;margin-bottom:3px;}
.rel-card-info strong{display:block;font-size:12px;}
.rel-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:13px;padding-top:12px;border-top:1px solid #edf1ef;}
@media(max-width:850px){.rel-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:560px){.rel-page-head{display:block}.rel-card-top{display:block}.rel-card-status{display:inline-block;margin-top:8px}.rel-card-grid{grid-template-columns:1fr 1fr}}


.rel-delete{
  border-color:#efd0d2 !important;
  color:#b94349 !important;
  background:#fff8f8 !important;
}
.rel-delete:hover{background:#fff0f1 !important;}
.rel-restore{
  border-color:#c9dfd2 !important;
  color:var(--green) !important;
  background:#f5fbf7 !important;
}


/* =========================================
   RELATÓRIOS COMPLETOS
========================================= */
.rel-main-tabs{
  display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px;
  padding-bottom:14px;border-bottom:1px solid var(--border);
}
.rel-main-tab{
  min-height:40px;padding:0 15px;border:1px solid var(--border);border-radius:10px;
  background:#fff;color:#536158;font-size:12px;font-weight:750;
}
.rel-main-tab.active{background:var(--green);border-color:var(--green);color:#fff;}
.rel-subview{display:none;}
.rel-subview.active{display:block;}
.rel-geral-filtros{
  display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-bottom:16px;
  background:#fff;border:1px solid var(--border);border-radius:14px;padding:14px;
}
.rel-geral-filtros .form-field{min-width:160px;flex:1;}
.rel-geral-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px;
}
.rel-geral-box{
  background:#fff;border:1px solid var(--border);border-radius:14px;padding:14px;box-shadow:var(--shadow);
}
.rel-geral-box small{display:block;color:var(--muted);font-size:10px;margin-bottom:5px;}
.rel-geral-box strong{display:block;font-size:22px;line-height:1.05;}
.rel-geral-section{
  background:#fff;border:1px solid var(--border);border-radius:16px;padding:16px;
  margin-bottom:14px;box-shadow:var(--shadow);
}
.rel-geral-section h3{font-size:16px;margin:0 0 12px;}
.rel-metric-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;}
.rel-metric{background:#f7faf8;border-radius:10px;padding:10px;}
.rel-metric small{display:block;color:var(--muted);font-size:9px;margin-bottom:3px;}
.rel-metric strong{font-size:12px;}
@media(max-width:900px){
  .rel-geral-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .rel-metric-list{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:560px){
  .rel-geral-grid,.rel-metric-list{grid-template-columns:1fr 1fr;}
}


/* =========================================
   FINANCEIRO
========================================= */
.fin-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px;
}
.fin-head h1{font-size:32px;font-weight:800;letter-spacing:-1px;}
.fin-head p{margin-top:6px;color:var(--muted);font-size:14px;}
.fin-kpis{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px;
}
.fin-kpi{
  background:#fff;border:1px solid var(--border);border-radius:16px;padding:16px;box-shadow:var(--shadow);
}
.fin-kpi small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px;}
.fin-kpi strong{display:block;font-size:25px;line-height:1.05;}
.fin-kpi.receita strong{color:#197347;}
.fin-kpi.despesa strong{color:#b9454c;}
.fin-kpi.saldo.negativo strong{color:#b9454c;}
.fin-toolbar{
  display:flex;gap:9px;align-items:end;flex-wrap:wrap;margin-bottom:14px;
  background:#fff;border:1px solid var(--border);border-radius:14px;padding:13px;
}
.fin-toolbar .form-field{min-width:150px;}
.fin-toolbar .form-field:first-child{flex:1;}
.fin-list{display:grid;gap:10px;}
.fin-item{
  background:#fff;border:1px solid var(--border);border-radius:14px;padding:14px 15px;
  display:grid;grid-template-columns:minmax(0,1.4fr) .7fr .7fr auto;gap:14px;align-items:center;
}
.fin-item-main strong{display:block;font-size:14px;margin-bottom:4px;}
.fin-item-main span{display:block;color:var(--muted);font-size:11px;}
.fin-chip{
  display:inline-flex;align-items:center;justify-content:center;padding:6px 9px;border-radius:999px;
  font-size:10px;font-weight:800;
}
.fin-chip.receita{background:#e8f6ee;color:#166b41;}
.fin-chip.despesa{background:#fff0f1;color:#b34249;}
.fin-value{text-align:right;font-size:14px;font-weight:800;}
.fin-value.receita{color:#166b41;}
.fin-value.despesa{color:#b34249;}
.fin-delete{
  width:34px;height:34px;border:1px solid #efd0d2;border-radius:9px;background:#fff8f8;color:#b94349;
  display:flex;align-items:center;justify-content:center;font-size:15px;
}
.fin-empty{
  min-height:180px;display:flex;align-items:center;justify-content:center;text-align:center;
  border:1px dashed var(--border);border-radius:16px;background:#fff;color:var(--muted);padding:24px;
}
@media(max-width:900px){
  .fin-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  .fin-item{grid-template-columns:1fr auto;}
  .fin-item .fin-meta{display:none;}
}
@media(max-width:560px){
  .fin-head{display:block}.fin-head .btn-primary{width:100%;margin-top:14px;}
  .fin-kpis{grid-template-columns:1fr 1fr;}
  .fin-toolbar{display:grid;grid-template-columns:1fr 1fr;}
  .fin-toolbar .form-field,.fin-toolbar .form-field:first-child{min-width:0;}
}


/* =========================================
   FINANCEIRO - EDIÇÃO + RESUMO CATEGORIAS
========================================= */
.fin-category-summary{
  margin:0 0 16px;
}
.fin-category-summary-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.fin-category-summary-head h3{
  margin:0;
  font-size:17px;
}
.fin-category-summary-head span{
  color:var(--muted);
  font-size:11px;
}
.fin-category-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.fin-category-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:13px;
  padding:12px;
  box-shadow:var(--shadow);
}
.fin-category-card small{
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-bottom:5px;
}
.fin-category-card strong{
  display:block;
  font-size:15px;
}
.fin-category-card.receita strong{color:#166b41;}
.fin-category-card.despesa strong{color:#b34249;}

.fin-actions{
  display:flex;
  gap:6px;
  justify-content:flex-end;
}
.fin-edit{
  width:34px;
  height:34px;
  border:1px solid #cfe1d5;
  border-radius:9px;
  background:#f6fbf8;
  color:var(--green);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
}
.fin-edit:hover{
  background:#edf7f1;
}
@media(max-width:900px){
  .fin-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:560px){
  .fin-category-grid{grid-template-columns:1fr;}
}


.fin-auto-alert{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid #cfe4d6;
  border-radius:12px;
  background:#f2faf5;
  color:#315c43;
  font-size:12px;
  line-height:1.45;
}
.fin-auto-alert strong{
  display:block;
  margin-bottom:2px;
  color:#174f31;
}
.fin-auto-alert-icon{
  width:28px;
  height:28px;
  flex:none;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#dff2e6;
  color:var(--green);
  font-weight:800;
}


/* =========================================
   VENDA DO ANIMAL
========================================= */
.animal-sale-box{
  margin-top:14px;
  padding:14px;
  border:1px solid #cfe4d6;
  border-radius:13px;
  background:#f3faf6;
}
.animal-sale-box h4{
  margin:0 0 4px;
  color:#174f31;
  font-size:14px;
}
.animal-sale-box > p{
  margin:0 0 12px;
  color:#5c6f63;
  font-size:11px;
  line-height:1.45;
}
.animal-sale-summary{
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  background:#e7f6ed;
  color:#315c43;
  font-size:11px;
  line-height:1.45;
}


/* =========================================
   VENDAS DE ANIMAIS / GRUPOS / LOTES
========================================= */
.sale-head-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.sale-box{
  padding:13px;
  border:1px solid #cfe4d6;
  border-radius:12px;
  background:#f4faf6;
  color:#355d45;
  font-size:11px;
  line-height:1.45;
  margin-bottom:12px;
}
.sale-box strong{color:#174f31;}
.sale-summary{
  padding:11px 12px;
  border-radius:10px;
  background:#eaf7ef;
  color:#315d42;
  font-size:11px;
  line-height:1.45;
  margin-top:8px;
}
.btn-sale{
  border-color:#b8d8c5 !important;
  color:#17663f !important;
  background:#f4fbf7 !important;
}
.btn-sale:hover{background:#eaf7ef !important;}
@media(max-width:600px){
  .sale-head-actions{width:100%;}
  .sale-head-actions button{flex:1;}
}


/* =========================================
   PAINEL - GRÁFICO FINANCEIRO INTERATIVO
========================================= */
.fin-chart-wrap{
  position:relative;
  height:290px;
  margin-top:10px;
  padding:12px 8px 28px 52px;
}
.fin-chart-grid{
  position:absolute;
  left:52px;
  right:8px;
  top:12px;
  bottom:38px;
  background:
    linear-gradient(to bottom, rgba(226,232,228,.85) 1px, transparent 1px);
  background-size:100% 25%;
  pointer-events:none;
}
.fin-chart-y{
  position:absolute;
  left:0;
  top:8px;
  bottom:34px;
  width:48px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:flex-end;
  padding-right:8px;
  color:#7a8a80;
  font-size:10px;
}
.fin-chart-x{
  position:absolute;
  left:52px;
  right:8px;
  bottom:4px;
  display:flex;
  justify-content:space-between;
  color:#7a8a80;
  font-size:10px;
}
.fin-chart-svg{
  position:absolute;
  left:52px;
  right:8px;
  top:12px;
  bottom:38px;
  width:calc(100% - 60px);
  height:calc(100% - 50px);
  overflow:visible;
}
.fin-chart-dot{
  cursor:pointer;
  touch-action:manipulation;
}
.fin-chart-tooltip{
  position:absolute;
  z-index:10;
  min-width:150px;
  max-width:220px;
  padding:9px 11px;
  border:1px solid #dbe6df;
  border-radius:10px;
  background:#fff;
  box-shadow:0 8px 22px rgba(22,57,37,.14);
  font-size:11px;
  line-height:1.4;
  color:#30493a;
  pointer-events:none;
  display:none;
}
.fin-chart-tooltip strong{
  display:block;
  margin-bottom:4px;
  color:#153f29;
  font-size:12px;
}
.fin-chart-empty,
.feed-empty-state{
  min-height:180px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:#74837a;
  font-size:12px;
}
.feed-empty-state{
  min-height:220px;
  border:1px dashed #d9e5dd;
  border-radius:12px;
  background:#fbfdfc;
  padding:20px;
}


/* =========================================
   EQUIPE / PERMISSÕES
========================================= */
.team-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:18px;}
.team-page-head h1{font-size:30px;margin:0;}
.team-page-head p{color:var(--muted);font-size:13px;margin-top:5px;}
.team-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.team-card{background:#fff;border:1px solid var(--border);border-radius:15px;padding:15px;box-shadow:var(--shadow);}
.team-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.team-card h3{font-size:15px;margin:0 0 4px;}
.team-card p{font-size:11px;color:var(--muted);margin:0;}
.team-badge{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eaf6ef;color:#17683c;font-size:9px;font-weight:800;}
.team-badge.pending{background:#fff6e8;color:#9b6513;}
.team-badge.inactive{background:#f1f2f1;color:#68746d;}
.team-perms{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px;}
.team-perm-chip{font-size:9px;padding:4px 7px;border-radius:999px;background:#f3f7f4;color:#4b6253;}
.team-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px;padding-top:11px;border-top:1px solid #edf1ef;}
.team-empty{border:1px dashed var(--border);border-radius:14px;padding:28px;text-align:center;color:var(--muted);background:#fff;}
.perm-sections{display:grid;gap:9px;}
.perm-section{border:1px solid #e3eae6;border-radius:11px;padding:10px 12px;background:#fafcfb;}
.perm-section h4{font-size:12px;margin:0 0 8px;}
.perm-options{display:flex;flex-wrap:wrap;gap:10px 14px;}
.perm-option{display:flex;align-items:center;gap:6px;font-size:10px;color:#48574e;}
.perm-option input{width:16px;height:16px;accent-color:var(--green);}
.auth-first-access{margin-top:12px;padding-top:12px;border-top:1px solid #e5ebe7;text-align:center;}
.auth-first-access button{color:var(--green);font-weight:800;font-size:12px;}
.auth-signup-box{display:none;margin-top:14px;padding:13px;border-radius:12px;background:#f5faf7;border:1px solid #dce9e1;}
.auth-signup-box.open{display:block;}
@media(max-width:800px){.team-grid{grid-template-columns:1fr}.team-page-head{display:block}.team-page-head button{width:100%;margin-top:12px;}}


/* =========================================
   EQUIPE - INSTRUÇÕES DE PRIMEIRO ACESSO
========================================= */
.colab-access-note{
  margin-top:8px;
  padding:9px 11px;
  border-radius:10px;
  background:#f3f8f5;
  border:1px solid #dce8e1;
  color:#466052;
  font-size:10px;
  line-height:1.45;
}
.colab-access-note strong{
  color:#1b5638;
}
.colab-access-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.colab-access-preview{
  margin-top:9px;
  padding:10px 12px;
  border-radius:10px;
  border:1px dashed #cfddd4;
  background:#fbfdfc;
  color:#56675d;
  font-size:10px;
  line-height:1.5;
  white-space:pre-line;
}


/* =========================================
   PERFIL DA GRANJA / LOGOTIPO
========================================= */
.farm-profile-grid{
  display:grid;
  grid-template-columns:180px minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.farm-logo-box{
  width:160px;
  height:160px;
  border:1px dashed #cfded5;
  border-radius:18px;
  background:#f7faf8;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  color:#7b8b81;
  text-align:center;
  font-size:11px;
  padding:12px;
}
.farm-logo-box img{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#fff;
}
.farm-profile-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.sidebar-farm-name{
  margin-top:5px;
  color:var(--muted);
  font-size:11px;
  line-height:1.25;
  max-width:150px;
}
.sidebar-farm-name strong{
  display:block;
  color:#31463a;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media(max-width:700px){
  .farm-profile-grid{grid-template-columns:1fr;}
  .farm-logo-box{width:130px;height:130px;}
}

  

/* =========================================
   AJUSTES DA VERSÃO CLOUD
========================================= */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:3px solid rgba(25,115,71,.22);
  outline-offset:2px;
}
button:disabled{cursor:not-allowed;}
.auth-submit:disabled,.btn-primary:disabled{
  opacity:.62;
  transform:none;
  box-shadow:none;
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}
@media(max-width:860px){
  .mobile-nav{
    padding-bottom:env(safe-area-inset-bottom);
    height:calc(62px + env(safe-area-inset-bottom));
  }
  .content{
    padding-bottom:calc(84px + env(safe-area-inset-bottom));
  }
}


/* =========================================
   FOTOS DOS ANIMAIS
========================================= */
.animal-avatar-card img,
.detail-photo img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.animal-avatar-card.has-photo,
.detail-photo.has-photo{
  padding:0;
  background:#eef3ef;
  color:transparent;
}

.animal-photo-upload{
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:16px;
  align-items:center;
  padding:14px;
  border:1px solid #dce8e0;
  border-radius:14px;
  background:#f8fbf9;
}

.animal-photo-preview{
  width:120px;
  height:96px;
  border-radius:13px;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed #c7d9ce;
  background:#fff;
  color:#73907e;
}

.animal-photo-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.animal-photo-placeholder{
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#edf6f0;
  font-size:20px;
}

.animal-photo-copy strong{
  display:block;
  color:#31463a;
  font-size:13px;
  margin-bottom:4px;
}

.animal-photo-copy p{
  margin:0 0 10px;
  color:var(--muted);
  font-size:11px;
  line-height:1.45;
}

.animal-photo-input{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.animal-photo-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.animal-photo-label{
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.auth-legal-links{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  flex-wrap:wrap;
  margin-top:10px;
}

.auth-legal-links a{
  color:var(--green);
  font-weight:750;
}

.auth-legal-links a:hover{
  text-decoration:underline;
}

@media(max-width:560px){
  .animal-photo-upload{
    grid-template-columns:1fr;
  }

  .animal-photo-preview{
    width:100%;
    height:180px;
  }

  .animal-photo-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .animal-photo-actions .btn-secondary,
  .animal-photo-label{
    width:100%;
  }
}


/* =========================================
   STATUS DE CONEXÃO / VERSÃO
========================================= */
.network-banner{
  position:fixed;
  left:50%;
  top:14px;
  z-index:1200;
  transform:translate(-50%,-140%);
  width:min(620px,calc(100% - 28px));
  padding:11px 14px;
  border:1px solid #e5c879;
  border-radius:12px;
  background:#fff8df;
  color:#7a5a13;
  box-shadow:0 10px 28px rgba(64,51,17,.14);
  font-size:12px;
  font-weight:700;
  text-align:center;
  transition:.2s ease;
  pointer-events:none;
}

.network-banner.show{
  transform:translate(-50%,0);
}

.app-version{
  display:block;
  margin-top:8px;
  color:#97a39c!important;
  font-size:10px!important;
}
