:root {
      --bg: #F8F3EA;
      --fg: #3D2618;
      --primary: #E4B03C;
      --primary-fg: #3D2618;
      --card: #FEFCF8;
      --secondary: #EDE5CE;
      --muted: #DDD3C0;
      --muted-fg: #8B7155;
      --border: #E5DAC8;
      --accent: #3D2618;
      --accent-fg: #FEFCF8;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent
    }

    html,
    body {
      height: 100%;
      overscroll-behavior: none
    }

    body {
      font-family: 'DM Sans', sans-serif;
      background: #2C2C2A;
      color: var(--fg);
      min-height: 100vh
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      letter-spacing: -.025em
    }

    #root {
      min-height: 100vh;
      display: flex;
      justify-content: center;
      background: #2C2C2A
    }

    #shell {
      width: 100%;
      max-width: 430px;
      min-height: 100vh;
      background: var(--bg);
      position: relative;
      display: flex;
      flex-direction: column
    }

    @media (min-width: 768px) {

      /* ── ROOT E SHELL ── */
      #root {
        background: #1a1208;
        align-items: stretch;
        justify-content: flex-start;
      }

      #shell {
        max-width: 100%;
        flex-direction: row;
        min-height: 100vh;
        background: transparent;
        box-shadow: none;
      }

      /* ── TOPBAR: oculta no desktop ── */
      .topbar {
        display: none;
      }

      #install-banner {
        display: none !important;
      }

      /* ── SIDEBAR ── */
      .nav-wrap {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 240px;
        height: 100vh;
        transform: none;
        max-width: 240px;
        padding: 0;
        z-index: 50;
        pointer-events: auto;
        display: flex;
        flex-direction: column;
      }

      .bottom-nav {
        flex-direction: column;
        border-radius: 0;
        height: 100vh;
        padding: 0;
        gap: 0;
        background: #2C1F10;
        border: none;
        border-right: 1px solid rgba(255, 255, 255, .08);
        box-shadow: 4px 0 24px rgba(0, 0, 0, .3);
        justify-content: flex-start;
      }

      /* Logo na sidebar */
      .bottom-nav::before {
        content: '';
        display: block;
        height: 64px;
        background: url('logo-header.png') no-repeat center/contain;
        margin: 20px 20px 8px;
        flex-shrink: 0;
      }

      /* Linha separadora após logo */
      .bottom-nav::after {
        content: '';
        display: block;
        height: 1px;
        background: rgba(255, 255, 255, .1);
        margin: 0 16px 12px;
        flex-shrink: 0;
      }

      .nav-item {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 13px 20px;
        border-radius: 12px;
        width: calc(100% - 16px);
        margin: 2px 8px;
        color: rgba(255, 255, 255, .5);
        font-size: 14px;
      }

      .nav-item.active {
        color: #fff;
      }

      .nav-item.active::before {
        border-radius: 12px;
        background: rgba(228, 176, 60, .10);
      }

      .nav-item svg {
        width: 20px;
        height: 20px;
      }

      .nav-item.active svg {
        color: var(--primary);
      }

      .nav-label {
        font-size: 14px;
        font-weight: 500;
        position: relative;
        z-index: 1;
      }

      /* ── ÁREA PRINCIPAL ── */
      .scroll-area {
        margin-left: 240px;
        flex: 1;
        background: var(--bg);
        min-height: 100vh;
        overflow-y: auto;
        padding-bottom: 40px;
      }

      /* ── HEADER DESKTOP ── */
      .scroll-area::before {
        content: attr(data-title);
        display: block;
        padding: 20px 32px 0;
        font-family: 'Syne', sans-serif;
        font-weight: 700;
        font-size: 22px;
        color: var(--fg);
      }

      /* ── HERO CARD ── */
      .hero-card {
        margin: 20px 32px;
        padding: 28px 32px;
      }

      .hero-ring {
        width: 120px;
        height: 120px;
      }

      .hero-ring-inner {
        width: 94px;
        height: 94px;
      }

      .hero-ring.lg {
        width: 120px;
        height: 120px;
      }

      .hero-ring-inner.lg {
        width: 94px;
        height: 94px;
      }

      /* ── STATS EM GRID 4 COLUNAS ── */
      .stats-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        padding: 0 32px;
        margin-bottom: 28px;
      }

      /* ── AÇÕES RÁPIDAS ── */
      .page-inner {
        padding: 0 32px 8px;
      }

      .quick-row {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
      }

      /* ── ATIVIDADES ── */
      .activities-card {
        margin-bottom: 8px;
      }

      /* ── REBANHO ── */
      .rebanho-header {
        padding: 20px 32px 12px;
      }

      .filter-chips {
        padding: 0 32px;
      }

      .search-bar {
        margin: 0 32px 12px;
      }

      .animal-list {
        padding: 0 32px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
      }

      .animal-card {
        margin: 0;
      }

      /* ── SAÚDE ── */
      .saude-list {
        padding: 0 32px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
      }

      /* ── SEC TITLES ── */
      .sec-row {
        padding: 16px 32px 12px;
      }

      /* ── MODAL: centralizado no desktop ── */
      .modal-overlay {
        align-items: flex-start;
      }

      .modal {
        border-radius: 24px;
        max-width: 520px;
        max-height: 85vh;
      }
    }

    /* ── PROFILE DRAWER ── */
    .drawer-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(61, 38, 24, .5);
      backdrop-filter: blur(3px);
      z-index: 150
    }

    .drawer-overlay.open {
      display: block
    }

    .profile-drawer {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: 280px;
      background: var(--bg);
      z-index: 151;
      transform: translateX(100%);
      transition: transform .3s cubic-bezier(.4, 0, .2, 1);
      display: flex;
      flex-direction: column;
      box-shadow: -8px 0 32px rgba(61, 38, 24, .2);
    }

    .profile-drawer.open {
      transform: translateX(0)
    }

    .drawer-header {
      padding: 20px 20px 16px;
      border-bottom: 1px solid var(--border)
    }

    .drawer-avatar {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: linear-gradient(135deg, var(--accent), #5C3A22);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Syne', sans-serif;
      font-weight: 800;
      font-size: 22px;
      color: #fff;
      margin-bottom: 12px;
    }

    .drawer-nome {
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 15px;
      color: var(--fg)
    }

    .drawer-local {
      font-size: 12px;
      color: var(--muted-fg);
      margin-top: 2px
    }

    .drawer-plano {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      margin-top: 8px;
      padding: 4px 10px;
      border-radius: 20px;
      background: var(--gold-dim);
      border: 1px solid rgba(228, 176, 60, .3);
      font-size: 11px;
      font-weight: 700;
      color: var(--fg);
    }

    .drawer-body {
      flex: 1;
      overflow-y: auto;
      padding: 8px 0
    }

    .drawer-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 20px;
      cursor: pointer;
      transition: background .15s;
      border: none;
      background: transparent;
      width: 100%;
      text-align: left;
      font-family: inherit;
      color: var(--fg);
      font-size: 14px;
      font-weight: 500;
    }

    .drawer-item:hover {
      background: rgba(61, 38, 24, .05)
    }

    .drawer-item svg {
      width: 20px;
      height: 20px;
      color: var(--muted-fg);
      flex-shrink: 0
    }

    .drawer-item.danger {
      color: var(--red)
    }

    .drawer-item.danger svg {
      color: var(--red)
    }

    .drawer-sep {
      height: 1px;
      background: var(--border);
      margin: 4px 0
    }

    .drawer-version {
      padding: 12px 20px;
      font-size: 11px;
      color: var(--muted-fg)
    }

    /* OFFLINE */
    #offline-banner {
      display: none;
      position: fixed;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 100%;
      max-width: 430px;
      background: #E57373;
      color: #fff;
      text-align: center;
      font-size: 12px;
      font-weight: 600;
      padding: 6px;
      z-index: 9999
    }

    #offline-banner.show {
      display: block
    }

    /* LOGIN */
    #login-screen {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      min-height: 100vh;
      min-height: 100dvh;
      height: 100vh;
      height: 100dvh;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      box-sizing: border-box;
      padding: max(24px, env(safe-area-inset-top)) 28px calc(32px + env(safe-area-inset-bottom));
      background: linear-gradient(160deg, #2C1F10 0%, #4A3018 50%, #3D2618 100%);
      position: fixed;
      inset: 0;
      z-index: 990;
      transition: opacity .4s, transform .4s
    }

    #login-screen.out {
      opacity: 0;
      transform: translateY(-20px);
      pointer-events: none
    }

    .login-logo-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-bottom: 24px;
      flex-shrink: 0
    }

    .login-logo-wrap img {
      height: 56px;
      width: auto;
      margin-bottom: 16px
    }

    .login-logotext {
      display: none;
      font-family: 'Syne', sans-serif;
      font-weight: 800;
      font-size: 32px;
      color: var(--primary);
      margin-bottom: 16px
    }

    .login-tagline {
      color: rgba(255, 255, 255, .55);
      font-size: 13px;
      text-align: center;
      max-width: 240px;
      line-height: 1.6
    }

    .login-card {
      background: rgba(255, 255, 255, .08);
      backdrop-filter: blur(16px);
      border: 1px solid rgba(255, 255, 255, .15);
      border-radius: 24px;
      padding: 32px 24px;
      width: 100%;
      max-width: 380px;
      flex-shrink: 0;
      margin-bottom: max(8px, env(safe-area-inset-bottom))
    }

    .login-label {
      color: rgba(255, 255, 255, .7);
      font-size: 14px;
      font-weight: 500;
      margin-bottom: 8px;
      display: block
    }

    .login-input {
      width: 100%;
      background: rgba(255, 255, 255, .1);
      border: 1.5px solid rgba(255, 255, 255, .15);
      border-radius: 14px;
      padding: 15px 16px;
      color: #fff;
      font-size: 16px;
      font-family: inherit;
      outline: none;
      transition: border-color .2s
    }

    .login-input::placeholder {
      color: rgba(255, 255, 255, .35)
    }

    .login-input:focus {
      border-color: var(--primary)
    }

    .login-hint {
      color: rgba(255, 255, 255, .3);
      font-size: 11px;
      margin-top: 6px
    }

    .login-field-gap {
      margin-top: 16px
    }

    .login-mode-title {
      color: #fff;
      font-family: 'Syne', sans-serif;
      font-size: 18px;
      font-weight: 700;
      margin: 0 0 18px;
      text-align: center
    }

    .login-activation-hint {
      color: rgba(255, 255, 255, .7);
      font-size: 12px;
      line-height: 1.5;
      margin: -8px 0 18px;
      text-align: center
    }

    .login-remember {
      align-items: center;
      color: rgba(255, 255, 255, .75);
      cursor: pointer;
      display: flex;
      font-size: 13px;
      gap: 9px;
      margin-top: 16px
    }

    .login-remember input {
      accent-color: var(--primary);
      height: 17px;
      width: 17px
    }

    .login-btn {
      width: 100%;
      margin-top: 20px;
      padding: 16px;
      background: var(--primary);
      color: var(--primary-fg);
      border: none;
      border-radius: 14px;
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 15px;
      cursor: pointer;
      transition: transform .15s
    }

    .login-btn:active {
      transform: scale(.97)
    }

    .login-btn:disabled {
      opacity: .5;
      cursor: not-allowed
    }

    .login-error {
      color: #FFB4AB;
      font-size: 12px;
      margin-top: 12px;
      text-align: center;
      min-height: 18px;
      line-height: 1.45
    }

    @media (min-height: 900px) {
      #login-screen {
        justify-content: center
      }
    }

    @media (max-height: 760px) {
      #login-screen {
        padding-top: max(16px, env(safe-area-inset-top))
      }

      .login-logo-wrap {
        margin-bottom: 16px
      }

      #login-screen .login-logo-wrap img {
        height: 48px !important
      }

      .login-tagline {
        line-height: 1.35
      }

      .login-card {
        padding: 24px 20px
      }
    }

    .login-help {
      color: rgba(255, 255, 255, .55);
      font-size: 12px;
      line-height: 1.5;
      margin: 14px 0 0;
      text-align: center
    }

    .login-help strong {
      color: rgba(255, 255, 255, .9)
    }

    /* APP */
    #app {
      display: none;
      flex-direction: column;
      flex: 1
    }

    #app.visible {
      display: flex
    }

    /* TOPBAR */
    .topbar {
      background: rgba(255, 255, 255, .7);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid rgba(255, 255, 255, .5);
      padding: 0 16px;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky;
      top: 0;
      z-index: 100;
      border-radius: 0 0 24px 24px
    }

    .topbar-logo img {
      height: 36px;
      width: auto;
      object-fit: contain
    }

    .topbar-logotext {
      display: none;
      font-family: 'Syne', sans-serif;
      font-weight: 800;
      font-size: 20px;
      color: var(--primary)
    }

    .topbar-right {
      display: flex;
      align-items: center;
      gap: 2px
    }

    .icon-btn {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: transparent;
      color: var(--fg);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background .15s
    }

    .icon-btn:hover {
      background: rgba(0, 0, 0, .05)
    }

    .icon-btn svg {
      width: 20px;
      height: 20px
    }

    /* INSTALL BANNER */
    #install-banner {
      display: none;
      margin: 10px 16px;
      background: rgba(228, 176, 60, .12);
      border: 1px solid rgba(228, 176, 60, .4);
      border-radius: 16px;
      padding: 12px 14px;
      align-items: center;
      gap: 10px
    }

    #install-banner.show {
      display: flex
    }

    .install-text {
      flex: 1;
      font-size: 14px;
      color: var(--fg);
      line-height: 1.4
    }

    .install-btn-el {
      background: var(--primary);
      color: var(--primary-fg);
      border: none;
      border-radius: 10px;
      padding: 8px 14px;
      font-weight: 700;
      font-size: 12px;
      font-family: inherit;
      cursor: pointer;
      flex-shrink: 0
    }

    .install-close {
      background: transparent;
      border: none;
      color: var(--muted-fg);
      cursor: pointer;
      font-size: 18px;
      padding: 0;
      line-height: 1;
      flex-shrink: 0
    }

    /* SCROLL */
    .scroll-area {
      flex: 1;
      overflow-y: auto;
      padding-bottom: 100px;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none
    }

    .scroll-area::-webkit-scrollbar {
      display: none
    }

    .page {
      display: none
    }

    .page.active {
      display: block
    }

    /* HERO */
    .hero-card {
      background: linear-gradient(135deg, #3B2619 0%, #40291B 62%, #4A301E 100%);
      border-radius: 24px;
      margin: 16px;
      padding: 24px;
      position: relative;
      overflow: hidden;
      box-shadow: 0 8px 32px rgba(61, 38, 24, .25)
    }

    .hero-blur1 {
      position: absolute;
      right: -40px;
      top: -40px;
      width: 160px;
      height: 160px;
      border-radius: 50%;
      background: rgba(228, 176, 60, .2);
      filter: blur(40px);
      pointer-events: none
    }

    .hero-blur2 {
      position: absolute;
      left: -40px;
      bottom: -40px;
      width: 128px;
      height: 128px;
      border-radius: 50%;
      background: rgba(228, 176, 60, .06);
      filter: blur(32px);
      pointer-events: none
    }

    .hero-greeting {
      color: rgba(255, 255, 255, .62);
      font-size: 12px;
      font-weight: 500;
      margin-bottom: 2px;
      display: flex;
      align-items: center;
      gap: 6px
    }

    .hero-wave {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 17px;
      line-height: 1
    }

    .hero-fazenda {
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 14px;
      color: #fff;
      margin-bottom: 2px
    }

    .hero-local {
      color: rgba(255, 255, 255, .45);
      font-size: 11px;
      margin-bottom: 12px
    }

    .hero-stats {
      display: flex;
      align-items: center;
      position: relative;
      z-index: 1
    }

    .hero-side {
      flex: 1;
      display: flex;
      justify-content: center
    }

    .hero-ring {
      width: 112px;
      height: 112px;
      border-radius: 50%;
      border: 4px solid rgba(219, 178, 96, .48);
      box-shadow: inset 0 0 0 1px rgba(255, 235, 190, .08), 0 0 0 1px rgba(91, 55, 26, .18);
      display: flex;
      align-items: center;
      justify-content: center
    }

    .hero-ring-inner {
      width: 88px;
      height: 88px;
      border-radius: 50%;
      background: #F8F2E7;
      border: 2px solid rgba(216, 170, 79, .82);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 3px 10px rgba(24,14,8,.12);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center
    }

    .hero-ring.lg {
      width: 112px;
      height: 112px
    }

    .hero-ring-inner.lg {
      width: 88px;
      height: 88px
    }

    .rl {
      color: #7B674F;
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .1em;
      line-height: 1
    }

    .rn {
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      color: #342116;
      font-size: 28px;
      line-height: 1;
      letter-spacing: -.025em;
      margin-top: 2px
    }

    .rs {
      color: #9A6A13;
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .1em;
      line-height: 1;
      margin-top: 2px
    }

    .hero-divider {
      width: 1px;
      height: 80px;
      background: rgba(255, 255, 255, .15);
      flex-shrink: 0
    }

    .hero-bottom {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid rgba(255, 255, 255, .1);
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative;
      z-index: 1
    }

    .hero-trend {
      display: flex;
      align-items: center;
      gap: 6px;
      color: rgba(255, 255, 255, .7);
      font-size: 13px
    }

    .hero-price-change {
      display: flex;
      align-items: center;
      gap: 4px;
      color: #6ee7b7;
      font-size: 13px;
      font-weight: 600
    }

    /* PAGE INNER */
    .page-inner {
      padding: 0 20px 8px
    }

    .sec-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
      padding: 0 4px
    }

    .sec-title {
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 15px;
      color: var(--fg)
    }

    .sec-link {
      font-size: 14px;
      color: var(--primary);
      font-weight: 600;
      background: none;
      border: none;
      cursor: pointer;
      font-family: inherit
    }

    /* QUICK ACTIONS */
    .quick-row {
      display: flex;
      gap: 16px;
      overflow-x: auto;
      padding: 2px 4px 16px;
      margin: 0 -20px;
      padding-left: 20px;
      padding-right: 20px;
      scrollbar-width: none
    }

    .quick-row::-webkit-scrollbar {
      display: none
    }

    .quick-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      min-width: 68px;
      background: none;
      border: none;
      cursor: pointer;
      padding: 0;
      font-family: inherit
    }

    .quick-icon {
      width: 56px;
      height: 56px;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(93, 63, 39, .16);
      box-shadow: 0 2px 8px rgba(61, 38, 24, .07), inset 0 0 0 1px rgba(255,255,255,.42);
      flex-shrink: 0;
      overflow: hidden
    }

    .qi-blue {
      background: #EFF6FF;
      color: #1D4ED8
    }

    .qi-green {
      background: #F0FDF4;
      color: #166534
    }

    .qi-purple {
      background: #FAF5FF;
      color: #7E22CE
    }

    .qi-orange {
      background: #FFF7ED;
      color: #7C2D12;
      font-size: 25px
    }


    .qi-emerald {
      background: #ECFDF5;
      color: #065F46
    }

    .quick-label {
      font-size: 12px;
      font-weight: 500;
      color: var(--muted-fg);
      text-align: center;
      white-space: nowrap
    }

    /* STATS GRID */
    .stats-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      padding: 0 4px;
      margin-bottom: 24px
    }

    .stat-card {
      padding: 16px;
      border-radius: 16px;
      border-width: 1px;
      border-style: solid;
      box-shadow: 0 2px 7px rgba(61, 38, 24, .055), inset 0 0 0 1px rgba(61, 38, 24, .025)
    }

    .stat-card.blue {
      background: rgba(239, 246, 255, .5);
      border-color: #BFDBFE
    }

    .stat-card.pink {
      background: rgba(253, 242, 248, .5);
      border-color: #FBCFE8
    }

    .stat-card.purple {
      background: rgba(250, 245, 255, .5);
      border-color: #E9D5FF
    }

    .stat-card.emerald {
      background: rgba(236, 253, 245, .5);
      border-color: #A7F3D0
    }

    .stat-label {
      font-size: 14px;
      font-weight: 500;
      color: var(--muted-fg);
      margin-bottom: 4px
    }

    .stat-num {
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 24px;
      color: var(--fg)
    }

    /* ATIVIDADES */
    .activities-card {
      background: var(--card);
      border-radius: 24px;
      padding: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
      border: 1px solid var(--border)
    }

    .activity-row {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 12px;
      border-bottom: 1px solid var(--border)
    }

    .activity-row:last-child {
      border-bottom: none
    }

    .act-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
      margin-top: 5px
    }

    .act-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--fg)
    }

    .act-sub {
      font-size: 12px;
      color: var(--muted-fg);
      margin-top: 1px
    }

    .act-time {
      font-size: 11px;
      color: var(--muted-fg);
      margin-left: auto;
      flex-shrink: 0
    }

    /* ── REBANHO ── */
    .rebanho-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px 12px
    }

    .rebanho-title {
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 20px;
      color: var(--fg)
    }

    .add-circle-btn {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--fg);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px rgba(61, 38, 24, .3);
      transition: transform .15s
    }

    .add-circle-btn:active {
      transform: scale(.93)
    }

    .add-circle-btn svg {
      color: #fff;
      width: 22px;
      height: 22px
    }

    .filter-chips {
      display: flex;
      gap: 8px;
      padding: 0 20px;
      overflow-x: auto;
      scrollbar-width: none;
      margin-bottom: 12px
    }

    .filter-chips::-webkit-scrollbar {
      display: none
    }

    .chip {
      flex-shrink: 0;
      padding: 8px 18px;
      border-radius: 20px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: 1.5px solid var(--border);
      color: var(--muted-fg);
      transition: all .2s;
      background: transparent;
      font-family: inherit
    }

    .chip.active {
      background: var(--fg);
      color: #fff;
      border-color: var(--fg)
    }

    .search-bar {
      margin: 0 20px 12px;
      background: var(--card);
      border-radius: 14px;
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 14px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, .04)
    }

    .search-bar svg {
      color: var(--muted-fg);
      flex-shrink: 0;
      width: 18px;
      height: 18px
    }

    .search-input {
      flex: 1;
      background: transparent;
      border: none;
      outline: none;
      color: var(--fg);
      font-size: 14px;
      font-family: inherit;
      padding: 13px 0
    }

    .search-input::placeholder {
      color: var(--muted-fg)
    }

    .animal-list {
      padding: 0 20px;
      display: flex;
      flex-direction: column;
      gap: 12px
    }

    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--muted-fg);
      font-size: 14px
    }

    .raca-menu {
      display: none;
      flex-wrap: wrap;
      gap: 8px;
      padding: 0 20px 12px;
      animation: fadeIn .15s
    }

    .raca-menu.open {
      display: flex
    }

    .raca-chip {
      padding: 6px 14px;
      border-radius: 20px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      border: 1.5px solid var(--border);
      color: var(--muted-fg);
      background: var(--card);
      font-family: inherit;
      transition: all .2s
    }

    .raca-chip.active {
      background: var(--primary);
      color: var(--primary-fg);
      border-color: var(--primary)
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(-4px)
      }

      to {
        opacity: 1;
        transform: translateY(0)
      }
    }

    /* ANIMAL CARD - Replit style */
    .animal-card {
      background: var(--card);
      border-radius: 20px;
      border: 1px solid var(--border);
      box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
      overflow: hidden;
      cursor: pointer;
      transition: transform .15s, box-shadow .15s
    }

    .animal-card:active {
      transform: scale(.99)
    }

    .animal-card:hover {
      box-shadow: 0 4px 16px rgba(0, 0, 0, .1)
    }

    .animal-card-top {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px 10px
    }

    .animal-brinco-col {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 3px;
      flex-shrink: 0;
      width: 60px
    }

    .animal-brinco-tag {
      width: 60px;
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: center
    }

    .animal-brinco-tag svg {
      width: 100%;
      height: 100%;
      display: block
    }

    .animal-brinco-empty {
      opacity: .45;
      filter: grayscale(.6)
    }

    .animal-ordem-num {
      font-family: 'Syne', sans-serif;
      font-size: 13px;
      font-weight: 700;
      color: var(--muted-fg);
      letter-spacing: .5px
    }

    .animal-main {
      flex: 1;
      min-width: 0
    }

    .animal-brinco {
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 16px;
      color: var(--fg);
      line-height: 1.1
    }

    .animal-name-sub {
      font-size: 11px;
      color: var(--muted-fg);
      font-weight: 600;
      margin-top: 4px;
      line-height: 1.2
    }

    .animal-detail-txt {
      font-size: 12px;
      color: var(--muted-fg);
      margin-top: 2px
    }

    .animal-sex-tag {
      padding: 4px 10px;
      border-radius: 20px;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .5px;
      flex-shrink: 0
    }

    .tag-m {
      background: #DBEAFE;
      color: #1E40AF
    }

    .tag-f {
      background: #FCE7F3;
      color: #9D174D
    }

    .animal-card-meta {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 0 16px 10px;
      border-top: 1px solid var(--border);
      padding-top: 10px
    }

    .meta-item {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 12px;
      color: var(--muted-fg);
      font-weight: 500
    }

    .meta-item svg {
      width: 14px;
      height: 14px;
      flex-shrink: 0
    }

    .animal-card-chips {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      padding: 0 16px 12px
    }

    .status-chip {
      padding: 3px 9px;
      border-radius: 6px;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .3px
    }

    .chip-green {
      background: #DCFCE7;
      color: #166534
    }

    .chip-teal {
      background: #CCFBF1;
      color: #0F766E
    }

    .chip-purple {
      background: #EDE9FE;
      color: #6D28D9
    }

    .chip-amber {
      background: #FEF3C7;
      color: #92400E
    }

    .chip-purchase {
      background: #FEF3C7;
      color: #92400E;
      border: 1px solid #FCD34D
    }

    /* SAUDE / DECISÃO */
    .decision-page {
      padding: 18px 20px 28px
    }

    .decision-title {
      font-family: 'Syne', sans-serif;
      font-size: 22px;
      font-weight: 700;
      color: var(--fg);
      margin: 0 0 4px
    }

    .decision-subtitle {
      color: var(--muted-fg);
      font-size: 15px;
      line-height: 1.5;
      margin: 0 0 16px
    }

    .decision-summary {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 18px
    }

    .decision-summary-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 14px;
      box-shadow: 0 2px 8px rgba(61, 38, 24, .05)
    }

    .decision-summary-card strong {
      display: block;
      font-family: 'Syne', sans-serif;
      font-size: 24px;
      color: var(--fg);
      line-height: 1.1;
      margin-bottom: 4px
    }

    .decision-summary-card span {
      color: var(--muted-fg);
      font-size: 12px;
      line-height: 1.3
    }

    .care-section-title {
      font-size: 12px;
      font-weight: 800;
      letter-spacing: .07em;
      text-transform: uppercase;
      color: var(--muted-fg);
      margin: 18px 2px 9px
    }

    .care-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 16px;
      margin-bottom: 10px;
      box-shadow: 0 2px 8px rgba(61, 38, 24, .05)
    }

    .care-card-head {
      display: flex;
      gap: 10px;
      align-items: flex-start
    }

    .care-icon {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      background: var(--secondary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      flex-shrink: 0
    }

    .care-card-title {
      font-family: 'Syne', sans-serif;
      font-size: 17px;
      font-weight: 700;
      color: var(--fg)
    }

    .care-card-sub {
      color: var(--muted-fg);
      font-size: 13px;
      line-height: 1.45;
      margin-top: 4px
    }

    .care-badge {
      margin-left: auto;
      border-radius: 999px;
      padding: 5px 8px;
      font-size: 9px;
      font-weight: 800;
      white-space: nowrap
    }

    .care-badge.official {
      color: #7C2D12;
      background: #FFEDD5
    }

    .care-badge.plan {
      color: #365314;
      background: #ECFCCB
    }

    .care-metrics {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 7px;
      margin-top: 13px
    }

    .care-metric {
      background: rgba(244, 236, 218, .6);
      border-radius: 11px;
      padding: 9px 7px;
      text-align: center
    }

    .care-metric strong {
      display: block;
      font-size: 16px;
      color: var(--fg)
    }

    .care-metric span {
      display: block;
      font-size: 9px;
      color: var(--muted-fg);
      line-height: 1.25;
      margin-top: 2px
    }

    .care-note {
      font-size: 13px;
      color: var(--muted-fg);
      line-height: 1.5;
      margin-top: 11px
    }

    .bruc-animal-list {
      margin-top: 11px;
      border-top: 1px solid var(--border);
      padding-top: 8px
    }

    .bruc-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 7px 0;
      font-size: 11px;
      color: var(--fg)
    }

    .bruc-row + .bruc-row {
      border-top: 1px solid rgba(61,38,24,.06)
    }

    .bruc-row-name {
      flex: 1;
      min-width: 0;
      font-weight: 600
    }

    .mini-status {
      border-radius: 999px;
      padding: 4px 7px;
      font-size: 9px;
      font-weight: 800;
      white-space: nowrap
    }

    .mini-status.ok {
      color: #166534;
      background: #DCFCE7
    }

    .mini-status.review {
      color: #92400E;
      background: #FEF3C7
    }

    .care-action-row {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-top: 12px
    }

    .care-small-btn {
      border: 1px solid var(--border);
      background: var(--card);
      color: var(--fg);
      border-radius: 11px;
      padding: 9px 11px;
      font: 700 11px inherit;
      cursor: pointer
    }

    .preview-switch {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 7px;
      color: var(--muted-fg);
      font-size: 10px
    }

    .preview-switch button {
      width: 42px;
      height: 24px;
      border: none;
      border-radius: 999px;
      background: #D8D0C2;
      padding: 3px;
      cursor: pointer;
      transition: .2s
    }

    .preview-switch button::after {
      content: '';
      display: block;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #fff;
      box-shadow: 0 1px 3px rgba(0,0,0,.15);
      transition: .2s
    }

    .preview-switch button.on {
      background: #6B8E4E
    }

    .preview-switch button.on::after {
      transform: translateX(18px)
    }

    .care-list {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .care-list-item {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 12px 13px;
      display: flex;
      gap: 10px;
      align-items: center
    }

    .care-list-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0
    }

    .care-list-dot.red { background:#EF4444 }
    .care-list-dot.orange { background:#F59E0B }
    .care-list-dot.green { background:#22C55E }

    .care-list-main {
      flex: 1;
      min-width: 0
    }

    .care-list-title {
      color: var(--fg);
      font-size: 14px;
      font-weight: 700
    }

    .care-list-sub {
      color: var(--muted-fg);
      font-size: 12px;
      margin-top: 3px
    }

    .care-list-date {
      font-size: 11px;
      color: var(--muted-fg);
      white-space: nowrap
    }

    .whatsapp-primary {
      width: 100%;
      margin-top: 16px;
      border: none;
      border-radius: 14px;
      padding: 14px 16px;
      background: #2D6A4F;
      color: #fff;
      font: 700 15px 'Syne', sans-serif;
      cursor: pointer
    }

    /* PASTO E RAÇÃO */
    .feed-hero {
      background:
        radial-gradient(circle at 88% 12%, rgba(228,176,60,.22), transparent 35%),
        linear-gradient(140deg, #284C35 0%, #3D5D3C 55%, #6B5A2A 100%);
      color: #fff;
      border-radius: 20px;
      padding: 18px;
      margin-bottom: 14px;
      position: relative;
      overflow: hidden
    }

    .feed-eyebrow {
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .08em;
      color: rgba(255,255,255,.65)
    }

    .feed-title {
      font-family: 'Syne', sans-serif;
      font-size: 20px;
      font-weight: 700;
      margin: 4px 0
    }

    .feed-sub {
      font-size: 13px;
      line-height: 1.5;
      color: rgba(255,255,255,.78)
    }

    .feed-hero-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 14px
    }

    .feed-hero-stat {
      background: rgba(255,255,255,.10);
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 12px;
      padding: 10px
    }

    .feed-hero-stat strong {
      display: block;
      font-size: 18px;
      font-family: 'Syne', sans-serif
    }

    .feed-hero-stat span {
      font-size: 11px;
      color: rgba(255,255,255,.68)
    }

    .feed-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 15px;
      margin-bottom: 10px;
      box-shadow: 0 2px 8px rgba(61, 38, 24, .05)
    }

    .feed-card-head {
      display: flex;
      align-items: center;
      gap: 9px;
      margin-bottom: 10px
    }

    .feed-card-title {
      font-family: 'Syne', sans-serif;
      font-size: 16px;
      font-weight: 700;
      color: var(--fg)
    }

    .feed-data-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px
    }

    .feed-data {
      background: rgba(244,236,218,.6);
      border-radius: 11px;
      padding: 10px
    }

    .feed-data span {
      display: block;
      font-size: 11px;
      color: var(--muted-fg);
      margin-bottom: 3px
    }

    .feed-data strong {
      font-size: 12px;
      color: var(--fg)
    }

    .feed-estimate {
      border: 1px dashed rgba(61,38,24,.28);
      border-radius: 14px;
      padding: 14px;
      margin-top: 10px
    }

    .feed-estimate strong {
      display: block;
      color: var(--fg);
      font-size: 15px;
      margin-bottom: 4px
    }

    .feed-estimate p {
      margin: 0;
      color: var(--muted-fg);
      font-size: 13px;
      line-height: 1.5
    }

    /* RELATÓRIOS */
    .reports-page {
      padding: 18px 20px 30px
    }

    .reports-intro {
      background: linear-gradient(135deg, #3B2619 0%, #4A301E 100%);
      color: #fff;
      border-radius: 20px;
      padding: 18px;
      margin-bottom: 14px;
      box-shadow: 0 5px 18px rgba(61,38,24,.16)
    }

    .reports-intro h2 {
      font-size: 21px;
      margin-bottom: 6px
    }

    .reports-intro p {
      color: rgba(255,255,255,.76);
      font-size: 14px;
      line-height: 1.5
    }

    .reports-note {
      margin-top: 12px;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(255,255,255,.08);
      border: 1px solid rgba(255,255,255,.12);
      color: rgba(255,255,255,.82);
      font-size: 12px;
      line-height: 1.4
    }

    .report-latest {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 16px;
      margin-bottom: 14px;
      box-shadow: 0 2px 8px rgba(61,38,24,.05)
    }

    .report-latest-top,
    .report-history-row {
      display: flex;
      gap: 12px;
      align-items: center
    }

    .report-file-icon {
      width: 44px;
      height: 44px;
      flex-shrink: 0;
      border-radius: 13px;
      background: #F4E9D1;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 21px;
      border: 1px solid #E2D0AE
    }

    .report-title {
      font-family: 'Syne', sans-serif;
      font-size: 16px;
      font-weight: 700;
      color: var(--fg)
    }

    .report-meta {
      color: var(--muted-fg);
      font-size: 12px;
      line-height: 1.35;
      margin-top: 3px
    }

    .report-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 14px
    }

    .report-btn {
      border: 1px solid var(--border);
      background: var(--card);
      color: var(--fg);
      border-radius: 12px;
      padding: 11px 10px;
      font: 700 12px 'DM Sans', sans-serif;
      cursor: pointer
    }

    .report-btn.primary {
      background: var(--primary);
      border-color: var(--primary);
      color: var(--primary-fg)
    }

    .report-btn:disabled {
      opacity: .55;
      cursor: default
    }

    .reports-status {
      min-height: 20px;
      margin: 8px 2px 0;
      color: var(--muted-fg);
      font-size: 12px;
      line-height: 1.35
    }

    .report-history {
      display: flex;
      flex-direction: column;
      gap: 8px
    }

    .report-history-row {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 15px;
      padding: 12px
    }

    .report-history-main {
      flex: 1;
      min-width: 0
    }

    .report-history-actions {
      display: flex;
      gap: 5px
    }

    .report-icon-btn {
      width: 36px;
      height: 36px;
      border: 1px solid var(--border);
      background: var(--card);
      color: var(--fg);
      border-radius: 10px;
      cursor: pointer;
      font-size: 16px
    }

    /* REPRODUÇÃO */
    .repro-summary {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      margin-bottom: 16px
    }

    .repro-summary-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 15px;
      padding: 12px 8px;
      text-align: center;
      box-shadow: 0 2px 7px rgba(61,38,24,.05)
    }

    .repro-summary-card strong {
      display: block;
      font-family: 'Syne', sans-serif;
      font-size: 20px;
      color: var(--fg)
    }

    .repro-summary-card span {
      display: block;
      color: var(--muted-fg);
      font-size: 9px;
      line-height: 1.25;
      margin-top: 3px
    }

    .page-back-link {
      border: 1px solid var(--border);
      background: var(--card);
      color: var(--muted-fg);
      border-radius: 999px;
      padding: 7px 11px;
      font: 700 10px inherit;
      cursor: pointer;
      margin-bottom: 12px
    }

    .repro-alert-card {
      background: linear-gradient(135deg, rgba(255,247,237,.92), rgba(254,243,199,.72));
      border: 1px solid rgba(146,64,14,.18)
    }

    /* BOTTOM NAV */
    .nav-wrap {
      position: fixed;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 100%;
      max-width: 430px;
      padding: 0 16px 24px;
      z-index: 50;
      pointer-events: none
    }

    .bottom-nav {
      pointer-events: auto;
      background: rgba(255, 255, 255, .7);
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255, 255, 255, .5);
      border-radius: 100px;
      padding: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      box-shadow: 0 4px 20px rgba(61, 38, 24, .12)
    }

    .nav-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      padding: 8px 4px;
      cursor: pointer;
      border-radius: 100px;
      transition: all .25s;
      position: relative;
      border: none;
      background: transparent;
      color: var(--muted-fg);
      font-family: inherit
    }

    .nav-item.active {
      color: var(--fg)
    }

    .nav-item.active::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 100px;
      background: rgba(228, 176, 60, .15)
    }

    .nav-item svg {
      width: 24px;
      height: 24px;
      position: relative;
      z-index: 1;
      margin-bottom: 2px
    }

    .nav-label {
      font-size: 10px;
      font-weight: 500;
      position: relative;
      z-index: 1
    }

    /* MODAL EDITAR */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(61, 38, 24, .5);
      backdrop-filter: blur(4px);
      z-index: 200;
      align-items: flex-end;
      justify-content: center
    }

    .modal-overlay.open {
      display: flex
    }

    .modal {
      background: var(--bg);
      border-radius: 28px 28px 0 0;
      padding: 0;
      width: 100%;
      max-width: 430px;
      max-height: 92vh;
      display: flex;
      flex-direction: column
    }

    .modal-header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 20px 20px 0
    }

    .modal-back {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--secondary);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0
    }

    .modal-back svg {
      width: 18px;
      height: 18px;
      color: var(--fg)
    }

    .modal-head-title {
      flex: 1;
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 16px;
      color: var(--fg);
      text-align: center
    }

    .modal-close {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--secondary);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      font-size: 20px;
      color: var(--muted-fg)
    }

    .modal-body {
      flex: 1;
      overflow-y: auto;
      padding: 20px;
      scrollbar-width: none
    }

    .modal-body::-webkit-scrollbar {
      display: none
    }

    .form-section {
      margin-bottom: 20px
    }

    .form-label {
      font-size: 11px;
      font-weight: 700;
      color: var(--muted-fg);
      text-transform: uppercase;
      letter-spacing: .08em;
      margin-bottom: 8px;
      display: block
    }

    .form-grid-2 {
      display: grid;
      grid-template-columns: 1fr 2fr;
      gap: 12px;
      margin-bottom: 20px
    }

    .date-grid {
      grid-template-columns: 1fr 1fr;
      align-items: start
    }

    .origem-btn.active {
      background: var(--card);
      border-color: #78350F;
      color: #78350F;
      box-shadow: inset 0 0 0 .5px #78350F
    }

    .field-help {
      color: var(--muted-fg);
      font-size: 11px;
      line-height: 1.35;
      margin-top: 5px
    }

    .form-ordem-box {
      background: var(--secondary);
      border-radius: 12px;
      padding: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Syne', sans-serif;
      font-weight: 800;
      font-size: 18px;
      color: var(--fg)
    }

    .form-input {
      width: 100%;
      background: var(--card);
      border: 1.5px solid var(--border);
      border-radius: 12px;
      padding: 13px 14px;
      color: var(--fg);
      font-size: 15px;
      font-family: inherit;
      outline: none;
      transition: border-color .2s
    }

    .form-input:focus {
      border-color: var(--primary)
    }

    .form-input::placeholder {
      color: var(--muted-fg)
    }

    .animal-id-combo {
      display: flex;
      align-items: center;
      width: 100%;
      min-height: 48px;
      background: var(--card);
      border: 1.5px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      transition: border-color .2s
    }

    .animal-id-combo:focus-within {
      border-color: var(--primary)
    }

    .animal-id-prefix {
      color: var(--muted-fg);
      font-size: 11px;
      font-weight: 800;
      padding-left: 11px;
      white-space: nowrap
    }

    .animal-id-combo input {
      border: 0;
      outline: 0;
      background: transparent;
      color: var(--fg);
      font-family: inherit;
      font-size: 13px;
      padding: 13px 7px;
      min-width: 0
    }

    .animal-id-combo input:disabled {
      opacity: 1;
      color: var(--fg);
      -webkit-text-fill-color: var(--fg)
    }

    #f-brinco {
      width: 54px
    }

    #f-nome {
      flex: 1;
      width: 100%
    }

    .animal-id-divider {
      width: 1px;
      align-self: stretch;
      background: var(--border)
    }

    .animal-readonly .animal-id-combo:has(input:disabled) {
      opacity: 1;
      background: var(--card)
    }

    /* SEXO TOGGLE */
    .sexo-toggle {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 20px
    }

    .sexo-btn {
      padding: 14px;
      border-radius: 14px;
      border: 1.5px solid var(--border);
      background: var(--card);
      cursor: pointer;
      font-size: 15px;
      font-weight: 600;
      color: var(--muted-fg);
      font-family: inherit;
      transition: all .2s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px
    }

    .sexo-btn.active.m {
      background: var(--fg);
      border-color: var(--fg);
      color: #fff
    }

    .sexo-btn.active.f {
      background: #9D174D;
      border-color: #9D174D;
      color: #fff
    }

    .sexo-btn:disabled {
      cursor: default;
      opacity: 1
    }

    .sexo-raca-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      margin-bottom: 20px
    }

    .sexo-raca-grid .form-label {
      margin-bottom: 8px
    }

    .sexo-single-btn,
    .raca-inline-select {
      width: 100%;
      min-height: 54px
    }

    .raca-inline-select {
      padding: 14px 38px 14px 14px;
      border-radius: 14px;
      border: 1.5px solid var(--border);
      background: var(--card);
      color: var(--fg);
      font-family: inherit;
      font-size: 15px;
      font-weight: 600;
      outline: none;
      cursor: pointer
    }

    .raca-inline-select:focus {
      border-color: var(--primary)
    }

    .animal-readonly .form-input:disabled,
    .animal-readonly .raca-inline-select:disabled {
      opacity: 1;
      color: var(--fg);
      background: var(--card);
      -webkit-text-fill-color: var(--fg);
      cursor: default
    }

    .animal-readonly textarea:disabled {
      opacity: 1;
      color: var(--fg);
      -webkit-text-fill-color: var(--fg)
    }

    /* RAÇA GRID */
    .raca-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 20px
    }

    .raca-btn {
      padding: 13px 10px;
      border-radius: 12px;
      border: 1.5px solid var(--border);
      background: var(--card);
      cursor: pointer;
      font-size: 14px;
      font-weight: 600;
      color: var(--muted-fg);
      font-family: inherit;
      transition: all .2s;
      text-align: center
    }

    .raca-btn.active {
      background: var(--fg);
      border-color: var(--fg);
      color: #fff
    }

    .form-btn-row {
      display: flex;
      gap: 12px;
      padding: 16px 20px 24px
    }

    .btn-delete {
      flex: 1;
      padding: 14px;
      background: transparent;
      color: #DC2626;
      border: 1.5px solid #FCA5A5;
      border-radius: 12px;
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 13px;
      cursor: pointer
    }

    .btn-save {
      flex: 1;
      padding: 14px;
      background: var(--primary);
      color: var(--primary-fg);
      border: none;
      border-radius: 12px;
      font-family: 'Syne', sans-serif;
      font-weight: 700;
      font-size: 14px;
      cursor: pointer;
      transition: opacity .2s
    }

    .btn-save:disabled {
      opacity: .5
    }

    .form-msg {
      font-size: 12px;
      text-align: center;
      padding: 0 20px 8px;
      min-height: 20px;
      color: #E57373
    }
