:root{
  --green:#1F7A4C;
  --green2:#2E9B63;
  --green3:#DFF3E8;
  --green4:#F2FBF5;
  --dark:#182026;
  --muted:#5F6B73;
  --bg:#F4F7F7;
  --card:#FFFFFF;
  --line:#DCE5E8;
  --shadow:0 22px 55px rgba(17,24,39,.08);
  --shadow-soft:0 10px 28px rgba(17,24,39,.05);
}

*{box-sizing:border-box}
html,body{overflow-x:hidden}
body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--dark);
  background:
    radial-gradient(circle at top left, #edf8f1 0, #f5f7f8 34%),
    linear-gradient(180deg,#f8fbfb 0%,#f3f6f7 100%);
}

.wrap{
  max-width:1320px;
  margin:0 auto;
  padding:0 22px;
}

.site-header{
  position:sticky;
  top:0;
  z-index:90;
  backdrop-filter:blur(12px);
  background:rgba(255,255,255,.94);
  border-bottom:1px solid var(--line);
}

.header-bar{
  min-height:92px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:10px 22px;
}

.brand-link{
  display:flex;
  align-items:center;
  text-decoration:none;
}

.brand-logo{
  height:84px;
  width:auto;
  display:block;
}

.nav-desktop{
  display:flex;
  align-items:center;
  gap:10px;
}

.nav-desktop a,
.mobile-drawer a{
  text-decoration:none;
  color:var(--dark);
  font-weight:700;
  border-radius:14px;
}

.nav-desktop a{
  padding:11px 16px;
}

.nav-desktop a:hover,
.mobile-drawer a:hover{
  background:#eef6f1;
  color:var(--green);
}

.menu-toggle{
  display:none;
  width:50px;
  height:50px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
  cursor:pointer;
  box-shadow:var(--shadow-soft);
}

.menu-toggle span{
  width:20px;
  height:2px;
  background:var(--dark);
  border-radius:4px;
  display:block;
}

.mobile-drawer{
  display:none;
  padding:0 22px 18px;
}

.mobile-drawer.open{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.mobile-drawer a{
  display:block;
  padding:14px 16px;
  background:#fff;
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
}

.app-main{
  padding:34px 22px 48px;
}

.hero-grid,
.section-grid{
  display:grid;
  grid-template-columns:1.2fr .95fr;
  gap:22px;
  margin-bottom:24px;
}

.hero-panel,
.panel,
.section-card,
.record-card,
.quick-card,
.species-card,
.metric-card,
.empty-state,
.login-card{
  background:rgba(255,255,255,.96);
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow);
}

.hero-panel{
  padding:34px;
  background:
    radial-gradient(circle at top right, rgba(31,122,76,.10), transparent 28%),
    linear-gradient(135deg,#ffffff 0%,#f9fcfa 100%);
}

.hero-panel h1{
  margin:12px 0 12px;
  font-size:54px;
  line-height:1.02;
  letter-spacing:-1px;
}

.hero-panel p{
  margin:0;
  font-size:20px;
  line-height:1.5;
  color:var(--muted);
  max-width:760px;
}

.eyebrow{
  display:inline-block;
  background:var(--green3);
  color:var(--green);
  border-radius:999px;
  padding:9px 13px;
  font-size:13px;
  font-weight:700;
  letter-spacing:.2px;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}

.btn-primary,.btn-secondary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border:none;
  border-radius:16px;
  padding:14px 20px;
  font-weight:700;
  transition:.18s ease;
  cursor:pointer;
}

.btn-primary{
  background:linear-gradient(135deg,var(--green) 0%,var(--green2) 100%);
  color:#fff;
  box-shadow:0 10px 24px rgba(31,122,76,.20);
}

.btn-secondary{
  background:#fff;
  color:var(--dark);
  border:1px solid var(--line);
}

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

.metric-card{
  padding:22px;
}

.highlight-card{
  background:linear-gradient(180deg,#fbfffc 0%,#eef8f2 100%);
}

.metric-card span{
  display:block;
  font-size:14px;
  color:var(--muted);
  margin-bottom:12px;
}

.metric-card strong{
  display:block;
  font-size:34px;
  line-height:1.05;
  letter-spacing:-.5px;
  margin-bottom:8px;
}

.metric-card small{
  color:var(--muted);
  font-size:13px;
}

.panel{
  padding:24px;
}

.panel-head{
  margin-bottom:18px;
}

.panel-head h2{
  margin:8px 0 0;
  font-size:32px;
  line-height:1.08;
}

.stat-strip{
  display:grid;
  gap:16px;
}

.stat-row{
  display:grid;
  grid-template-columns:120px 1fr auto;
  gap:14px;
  align-items:center;
}

.stat-row label{
  font-weight:700;
}

.bar{
  height:12px;
  background:#edf2f4;
  border-radius:999px;
  overflow:hidden;
}

.bar span{
  display:block;
  height:100%;
  background:linear-gradient(135deg,var(--green) 0%,var(--green2) 100%);
  border-radius:999px;
}

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

.quick-card{
  padding:20px;
}

.quick-card strong{
  display:block;
  font-size:20px;
  margin-bottom:8px;
}

.quick-card span{
  color:var(--muted);
  line-height:1.45;
  font-size:15px;
}

.species-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:18px;
}

.species-card{
  text-decoration:none;
  color:inherit;
  padding:22px;
  transition:.18s ease;
}

.species-card:hover,
.quick-card:hover{
  transform:translateY(-3px);
  box-shadow:0 24px 58px rgba(17,24,39,.10);
}

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

.species-card h3{
  margin:0;
  font-size:30px;
  line-height:1.05;
}

.species-card p{
  margin:16px 0 14px;
  color:var(--muted);
  font-size:17px;
  line-height:1.55;
}

.card-mini{
  display:block;
  color:var(--muted);
  margin-bottom:10px;
}

.card-link{
  color:var(--green);
  font-weight:700;
  font-size:17px;
}

.badge{
  font-size:12px;
  font-weight:700;
  border-radius:999px;
  padding:8px 11px;
}

.badge-active{background:#def4e7;color:#0e6a3a}
.badge-soon{background:#eef1f4;color:#5f6b73}

.page-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  flex-wrap:wrap;
  margin-bottom:24px;
}

.page-head h1{
  margin:10px 0 8px;
  font-size:44px;
  line-height:1.05;
}

.page-copy{
  margin:0;
  color:var(--muted);
  font-size:18px;
  line-height:1.5;
  max-width:860px;
}

.empty-state{
  padding:32px;
}

.empty-state h2{
  margin:0 0 10px;
  font-size:34px;
}

.empty-state p{
  margin:0;
  color:var(--muted);
  font-size:18px;
}

.empty-compact{
  color:var(--muted);
  padding:14px 0;
}

.form-shell{
  background:transparent;
  border:none;
  box-shadow:none;
}

.section-card{
  padding:26px;
  margin-bottom:20px;
}

.section-card h2{
  margin:0 0 8px;
  font-size:28px;
}

.section-note{
  margin:0 0 16px;
  color:var(--muted);
  font-size:16px;
}

.field-grid{
  display:grid;
  gap:18px;
}

.field-grid.two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.span-2{
  grid-column:1 / -1;
}

.radio-wrap{
  display:flex;
  flex-wrap:wrap;
  gap:18px;
  margin:8px 0 18px;
  padding:16px 18px;
  background:#f8fbf9;
  border:1px solid var(--line);
  border-radius:18px;
}

.hint{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:13px;
}

.animal-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;
}

.animal-card{
  overflow:hidden;
  background:rgba(255,255,255,.96);
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
}

.animal-thumb{
  width:100%;
  height:240px;
  object-fit:cover;
  background:#eef4f0;
  display:block;
}

.empty-thumb{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
}

.animal-body{
  padding:18px;
}

.animal-body h3{
  margin:0 0 8px;
  font-size:24px;
}

.animal-body p{
  margin:0 0 8px;
  font-size:17px;
}

.animal-body span{
  color:var(--muted);
  font-size:14px;
}

.record-stack{
  display:grid;
  gap:16px;
}

.record-card{
  padding:20px;
}

.record-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

.login-shell{
  min-height:calc(100vh - 180px);
  display:grid;
  place-items:center;
}

.login-card{
  width:min(580px,100%);
  padding:36px;
  background:
    radial-gradient(circle at top right, rgba(31,122,76,.08), transparent 30%),
    linear-gradient(180deg,#ffffff 0%,#fbfcfc 100%);
}

.login-logo{
  width:390px;
  max-width:100%;
  display:block;
  margin:0 auto 24px;
}

.login-card h2{
  margin:0 0 10px;
  font-size:40px;
  line-height:1.04;
}

.login-copy{
  color:var(--muted);
  margin:0 0 20px;
  font-size:18px;
  line-height:1.45;
}

.helper-links{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin-top:18px;
  color:var(--muted);
}

.helper-links a{
  color:var(--green);
  text-decoration:none;
  font-weight:700;
  font-size:16px;
}

form p{
  margin:0 0 16px;
}

form label{
  display:block;
  font-weight:700;
  margin-bottom:6px;
}

form input,form select,form textarea{
  width:100%;
  margin-top:4px;
  padding:14px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  font-size:15px;
}

form textarea{
  min-height:120px;
}

@media (max-width: 1100px){
  .hero-grid,
  .section-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 900px){
  .nav-desktop{
    display:none;
  }
  .menu-toggle{
    display:flex;
  }
}

@media (max-width: 760px){
  .wrap{
    padding:0 16px;
  }

  .header-bar{
    min-height:78px;
    padding:10px 16px;
  }

  .brand-logo{
    height:60px;
  }

  .mobile-drawer{
    padding:0 16px 16px;
  }

  .hero-panel{
    padding:24px;
  }

  .hero-panel h1{
    font-size:38px;
  }

  .hero-panel p,
  .page-copy,
  .empty-state p,
  .login-copy,
  .species-card p{
    font-size:16px;
  }

  .metrics-grid,
  .quick-grid,
  .field-grid.two{
    grid-template-columns:1fr;
  }

  .span-2{
    grid-column:auto;
  }

  .panel-head h2,
  .page-head h1{
    font-size:32px;
  }

  .stat-row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .login-card{
    width:100%;
    padding:24px 20px;
    border-radius:24px;
  }

  .login-logo{
    width:290px;
  }

  .helper-links{
    justify-content:flex-start;
  }
}

/* ===== LOGO FIX OVERRIDES ===== */
.guest-header{
  justify-content:center !important;
}

.guest-header .brand-link{
  width:100%;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
}

.guest-header .brand-logo{
  height:112px !important;
  width:auto !important;
  display:block !important;
  margin:0 auto !important;
}

.login-brand-wrap{
  width:100%;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  margin:0 0 26px !important;
}

.login-logo{
  width:470px !important;
  max-width:100% !important;
  display:block !important;
  margin:0 auto !important;
}

@media (max-width: 760px){
  .guest-header .brand-logo{
    height:78px !important;
  }

  .login-logo{
    width:320px !important;
  }
}

/* ===== FINAL HEADER + LOGIN + QUICK CARD FIX ===== */
.header-bar{
  justify-content:space-between !important;
}

.brand-link{
  justify-content:flex-start !important;
  width:auto !important;
}

.brand-logo{
  height:84px !important;
  width:auto !important;
  margin:0 !important;
}

.login-brand-wrap{
  width:100%;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  text-align:center !important;
  margin:0 0 26px !important;
}

.login-logo{
  width:470px !important;
  max-width:100% !important;
  display:block !important;
  margin:0 auto !important;
}

.quick-card{
  display:block !important;
  text-decoration:none !important;
  color:var(--dark) !important;
  border:1px solid var(--line) !important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfcfc 100%) !important;
  box-shadow:var(--shadow-soft) !important;
}

.quick-card strong{
  color:var(--green) !important;
  text-decoration:none !important;
}

.quick-card span{
  color:var(--muted) !important;
  text-decoration:none !important;
}

.quick-card:hover{
  transform:translateY(-3px);
  box-shadow:0 24px 58px rgba(17,24,39,.10) !important;
}

@media (max-width: 760px){
  .brand-logo{
    height:60px !important;
  }

  .login-logo{
    width:320px !important;
  }
}


/* ===== RECOVER OVERRIDES START ===== */
.header-bar{
  justify-content:space-between !important;
}

.brand-link{
  width:auto !important;
  display:flex !important;
  justify-content:flex-start !important;
  align-items:center !important;
}

.brand-logo{
  height:84px !important;
  width:auto !important;
  display:block !important;
  margin:0 !important;
}

.login-brand-wrap{
  width:100%;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  text-align:center !important;
  margin:0 0 26px !important;
}

.login-logo{
  width:470px !important;
  max-width:100% !important;
  display:block !important;
  margin:0 auto !important;
}

.quick-card{
  display:block !important;
  text-decoration:none !important;
  color:var(--dark) !important;
}

.quick-card strong{
  color:var(--green) !important;
  text-decoration:none !important;
}

.quick-card span{
  color:var(--muted) !important;
  text-decoration:none !important;
}

.quick-card:hover{
  transform:translateY(-3px);
}

@media (max-width: 760px){
  .brand-logo{
    height:60px !important;
  }
  .login-logo{
    width:320px !important;
  }
}
/* ===== RECOVER OVERRIDES END ===== */


/* ===== LOGIN LOGO FINAL FIX ===== */
.login-brand-wrap{
  width:100%;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  text-align:center !important;
  margin:0 0 24px !important;
}

.login-logo-clean{
  width:360px !important;
  max-width:100% !important;
  height:auto !important;
  display:block !important;
  margin:0 auto !important;
}

@media (max-width: 760px){
  .login-logo-clean{
    width:260px !important;
  }
}

/* ===== PWA INSTALL BUTTON ===== */
.install-btn{
  border:0;
  background:linear-gradient(135deg,var(--green) 0%,var(--green2) 100%);
  color:#fff;
  font-weight:700;
  border-radius:14px;
  padding:11px 16px;
  cursor:pointer;
  box-shadow:var(--shadow-soft);
}

.install-btn-mobile{
  width:100%;
  text-align:left;
}

@media (max-width: 900px){
  .install-btn{
    display:block;
  }
}

/* ===== PWA INSTALL BUTTON FINAL ===== */
.install-btn{
  border:0;
  background:linear-gradient(135deg,var(--green) 0%,var(--green2) 100%);
  color:#fff;
  font-weight:700;
  border-radius:14px;
  padding:11px 16px;
  cursor:pointer;
  box-shadow:var(--shadow-soft);
}

.install-btn-mobile{
  width:100%;
  text-align:left;
}

/* ===== DELETE BUTTONS ===== */
.card-actions,
.record-actions{
  margin-top:16px;
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

.btn-danger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:14px;
  padding:11px 16px;
  background:#d92d20;
  color:#ffffff;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  box-shadow:0 10px 20px rgba(217,45,32,.18);
}

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

.btn-danger:focus{
  outline:2px solid #f97066;
  outline-offset:2px;
}

/* ===== CLICKABLE RECENT RECORDS + DETAIL UI ===== */
.recent-list{
  display:grid;
  gap:14px;
}

.recent-animal-link{
  text-decoration:none;
  color:inherit;
}

.recent-animal-card{
  display:grid;
  grid-template-columns:110px 1fr;
  gap:16px;
  align-items:center;
  background:rgba(255,255,255,.96);
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow-soft);
  padding:14px;
  transition:.18s ease;
}

.recent-animal-card:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 38px rgba(17,24,39,.10);
}

.recent-thumb-wrap{
  width:110px;
  height:110px;
  border-radius:18px;
  overflow:hidden;
  background:#eef4f0;
}

.recent-thumb{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.recent-thumb-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-size:13px;
}

.recent-animal-body{
  min-width:0;
}

.recent-head-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:8px;
}

.recent-animal-body p{
  margin:0 0 8px;
  color:var(--dark);
}

.recent-open-link{
  color:var(--green);
  font-weight:700;
}

/* ===== RECORD LIST SIDE THUMB UI ===== */
.records-vertical-list{
  display:grid;
  gap:18px;
}

.record-animal-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:18px;
  align-items:center;
  background:rgba(255,255,255,.96);
  border:1px solid var(--line);
  border-radius:26px;
  box-shadow:var(--shadow);
  padding:16px;
}

.record-animal-main{
  display:grid;
  grid-template-columns:140px 1fr;
  gap:18px;
  align-items:center;
  text-decoration:none;
  color:inherit;
  min-width:0;
}

.record-animal-thumb-wrap{
  width:140px;
  height:110px;
  border-radius:18px;
  overflow:hidden;
  background:#eef4f0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.record-animal-thumb{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#ffffff;
  display:block;
}

.record-animal-thumb-empty{
  color:var(--muted);
  font-size:13px;
}

.record-animal-info{
  min-width:0;
}

.record-animal-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:8px;
}

.record-animal-top h3{
  margin:0;
  font-size:24px;
}

.record-animal-info p{
  margin:0 0 6px;
  font-size:18px;
  color:var(--dark);
}

.record-animal-info span{
  display:block;
  color:var(--muted);
  margin-bottom:8px;
}

.record-open-link{
  color:var(--green);
  font-weight:700;
}

.record-animal-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:flex-end;
}

/* ===== ANIMAL DETAIL PAGE ===== */
.animal-detail-grid{
  display:grid;
  grid-template-columns:minmax(320px,420px) 1fr;
  gap:22px;
}

.animal-detail-photo-panel{
  padding:18px;
}

.animal-detail-photo{
  width:100%;
  height:420px;
  object-fit:contain;
  background:#ffffff;
  border-radius:20px;
  display:block;
}

.animal-detail-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  border:1px dashed var(--line);
}

.animal-detail-info-panel{
  padding:22px;
}

.detail-kv-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.detail-kv{
  background:#fbfcfd;
  border:1px solid var(--line);
  border-radius:18px;
  padding:14px 16px;
}

.detail-kv span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:6px;
}

.detail-kv strong{
  display:block;
  color:var(--dark);
  font-size:16px;
  line-height:1.4;
  word-break:break-word;
}

.detail-notes-box{
  margin-top:18px;
  background:#fbfcfd;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
}

.detail-notes-box span{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:8px;
}

.detail-notes-box p{
  margin:0;
  color:var(--dark);
  line-height:1.6;
}

@media (max-width: 900px){
  .record-animal-row{
    grid-template-columns:1fr;
  }

  .record-animal-actions{
    flex-direction:row;
    justify-content:flex-start;
    align-items:center;
  }

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

@media (max-width: 760px){
  .recent-animal-card,
  .record-animal-main{
    grid-template-columns:1fr;
  }

  .recent-thumb-wrap,
  .record-animal-thumb-wrap{
    width:100%;
    height:180px;
  }

  .record-animal-top,
  .recent-head-row{
    align-items:flex-start;
    flex-direction:column;
  }

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

/* ===== CLEAN ANIMAL DETAIL PAGE ===== */
.detail-clean-grid{
  display:grid;
  grid-template-columns:minmax(340px,430px) 1fr;
  gap:24px;
  align-items:start;
}

.detail-photo-card,
.detail-info-card{
  padding:22px;
}

.detail-section{
  margin-bottom:22px;
  padding-bottom:6px;
}

.detail-section:last-child{
  margin-bottom:0;
}

.detail-section-head{
  margin-bottom:16px;
}

.detail-section-head h2{
  margin:10px 0 0;
  font-size:28px;
  line-height:1.15;
  color:var(--dark);
}

.detail-photo-frame{
  width:100%;
  min-height:420px;
  border:1px solid var(--line);
  border-radius:22px;
  background:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.detail-photo-clean{
  width:100%;
  height:420px;
  object-fit:contain;
  display:block;
  background:#fff;
}

.detail-photo-empty{
  color:var(--muted);
  font-weight:700;
  background:#f8fbf9;
}

.detail-table{
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  background:#fff;
}

.detail-row{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:18px;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  align-items:start;
}

.detail-row:last-child{
  border-bottom:none;
}

.detail-label{
  font-size:14px;
  font-weight:700;
  color:var(--muted);
}

.detail-value{
  font-size:16px;
  font-weight:700;
  color:var(--dark);
  line-height:1.55;
  word-break:break-word;
}

.detail-notes-clean{
  margin-top:16px;
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px;
  background:#fff;
}

.detail-notes-value{
  margin-top:8px;
  color:var(--dark);
  line-height:1.7;
  font-size:15px;
  white-space:pre-wrap;
}

@media (max-width: 980px){
  .detail-clean-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .detail-row{
    grid-template-columns:1fr;
    gap:6px;
    padding:14px 14px;
  }

  .detail-photo-frame,
  .detail-photo-clean{
    min-height:280px;
    height:280px;
  }

  .detail-section-head h2{
    font-size:24px;
  }
}

/* ===== DETAIL LABEL VISUAL FIX ===== */
.detail-table{
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  background:#fff;
}

.detail-row{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:22px;
  padding:15px 18px;
  border-bottom:1px solid var(--line);
  align-items:center;
}

.detail-row:last-child{
  border-bottom:none;
}

.detail-label{
  font-size:15px !important;
  font-weight:800 !important;
  color:#182026 !important;
  letter-spacing:.1px;
}

.detail-label::after{
  content: ":";
  margin-left: 2px;
}

.detail-label-notes::after{
  content: "";
  margin-left: 0;
}

.detail-value{
  font-size:16px !important;
  font-weight:600 !important;
  color:#3b4750 !important;
  line-height:1.55;
  word-break:break-word;
}

.detail-notes-clean{
  margin-top:16px;
  border:1px solid var(--line);
  border-radius:20px;
  padding:18px;
  background:#fff;
}

.detail-notes-value{
  margin-top:10px;
  color:#3b4750 !important;
  line-height:1.7;
  font-size:15px;
  white-space:pre-wrap;
}

@media (max-width: 760px){
  .detail-row{
    grid-template-columns:1fr;
    gap:6px;
    padding:14px 14px;
    align-items:start;
  }

  .detail-label{
    font-size:14px !important;
  }

  .detail-value{
    font-size:15px !important;
  }
}

/* ===== FARM CARE MANAGEMENT ===== */
.wrap-actions{
  flex-wrap:wrap;
}

.recent-condition{
  display:inline-block;
  color:var(--muted);
  margin-bottom:8px;
}

.badge-danger{
  background:#fee4e2;
  color:#b42318;
}

.badge-warn{
  background:#fff3dc;
  color:#b54708;
}

.section-grid-care{
  margin-top:24px;
}

.compact-card p{
  margin:0;
}

.care-kpi{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:16px;
}

/* ===== TAG CHIPS ON ANIMAL PHOTOS ===== */
.recent-thumb-wrap,
.record-animal-thumb-wrap,
.detail-photo-frame{
  position:relative;
}

.tag-chip{
  position:absolute;
  top:10px;
  left:10px;
  z-index:3;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:6px 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:800;
  line-height:1;
  color:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.18);
  max-width:calc(100% - 20px);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.tag-chip-green{
  background:#16a34a;
}

.tag-chip-yellow{
  background:#eab308;
  color:#1f2937;
}

.tag-chip-red{
  background:#dc2626;
}

.detail-tag-chip{
  top:14px;
  left:14px;
  font-size:14px;
  min-height:34px;
  padding:8px 14px;
}

@media (max-width: 760px){
  .tag-chip{
    font-size:12px;
    min-height:28px;
    padding:6px 10px;
  }
}

/* ===== EAR TAG STYLE ===== */
.recent-thumb-wrap,
.record-animal-thumb-wrap,
.detail-photo-frame{
  position:relative;
  overflow:hidden;
}

.ear-tag-badge{
  position:absolute;
  top:10px;
  left:10px;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-family:Arial, Helvetica, sans-serif;
  font-weight:900;
  letter-spacing:.4px;
  line-height:1;
  color:#1a1a1a;
  text-shadow:none;
  background:linear-gradient(180deg,#ffe27a 0%,#f5cf4c 55%,#e9ba26 100%);
  border:2px solid #d2a91e;
  box-shadow:0 10px 18px rgba(15,23,42,.18);
  clip-path:polygon(18% 0%, 82% 0%, 100% 10%, 100% 90%, 86% 100%, 14% 100%, 0% 90%, 0% 10%);
}

.ear-tag-badge::before{
  content:"";
  position:absolute;
  top:8px;
  left:50%;
  transform:translateX(-50%);
  width:8px;
  height:8px;
  border-radius:50%;
  background:#9a7d14;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.25);
}

.ear-tag-small{
  width:74px;
  height:86px;
  padding:20px 8px 10px;
  font-size:18px;
}

.ear-tag-large{
  width:88px;
  height:102px;
  padding:24px 10px 12px;
  font-size:22px;
}

.tag-chip-green{
  background:linear-gradient(180deg,#ffe27a 0%,#f5cf4c 55%,#e9ba26 100%);
  border-color:#d2a91e;
  color:#1a1a1a;
}

.tag-chip-yellow{
  background:linear-gradient(180deg,#ffe27a 0%,#f5cf4c 55%,#e9ba26 100%);
  border-color:#d2a91e;
  color:#1a1a1a;
}

.tag-chip-red{
  background:linear-gradient(180deg,#ffd0d0 0%,#ff8a8a 55%,#e54848 100%);
  border-color:#c73a3a;
  color:#ffffff;
}

.detail-photo-frame{
  display:flex;
  align-items:center;
  justify-content:center;
}

.detail-photo-clean{
  width:100%;
  height:420px;
  object-fit:contain;
  display:block;
  background:#fff;
}

.record-animal-thumb,
.recent-thumb{
  object-fit:cover;
}

@media (max-width: 760px){
  .ear-tag-small{
    width:62px;
    height:72px;
    padding:17px 6px 8px;
    font-size:15px;
  }

  .ear-tag-large{
    width:74px;
    height:86px;
    padding:20px 8px 10px;
    font-size:17px;
  }

  .ear-tag-badge::before{
    width:7px;
    height:7px;
    top:7px;
  }
}

/* ===== V2 tag size fix for list/dashboard only ===== */
.ear-tag-small{
  width:52px;
  height:62px;
  padding:14px 5px 8px;
  font-size:11px;
  line-height:1.02;
  letter-spacing:.15px;
  top:8px;
  left:8px;
}

.ear-tag-small::before{
  width:6px;
  height:6px;
  top:6px;
}

@media (max-width: 760px){
  .ear-tag-small{
    width:46px;
    height:54px;
    padding:12px 4px 7px;
    font-size:10px;
    top:6px;
    left:6px;
  }

  .ear-tag-small::before{
    width:5px;
    height:5px;
    top:5px;
  }
}

/* ===== V2 clean small ear tag fix for dashboard and records list only ===== */
.recent-thumb-wrap .ear-tag-badge,
.record-animal-thumb-wrap .ear-tag-badge{
  width:50px;
  height:58px;
  padding:13px 4px 7px;
  font-size:10px;
  line-height:1.02;
  letter-spacing:.1px;
  top:7px;
  left:7px;
}

.recent-thumb-wrap .ear-tag-badge::before,
.record-animal-thumb-wrap .ear-tag-badge::before{
  width:5px;
  height:5px;
  top:5px;
}

@media (max-width: 760px){
  .recent-thumb-wrap .ear-tag-badge,
  .record-animal-thumb-wrap .ear-tag-badge{
    width:42px;
    height:48px;
    padding:10px 3px 6px;
    font-size:9px;
    top:5px;
    left:5px;
  }

  .recent-thumb-wrap .ear-tag-badge::before,
  .record-animal-thumb-wrap .ear-tag-badge::before{
    width:4px;
    height:4px;
    top:4px;
  }
}

/* ===== DASHBOARD V3 CONTROL ROOM ===== */
:root{
  --v3-bg:#f4f6f5;
  --v3-panel:#ffffff;
  --v3-panel-soft:#f8faf8;
  --v3-line:#d9e3df;
  --v3-text:#18242a;
  --v3-muted:#66747b;
  --v3-brand:#1f7a4c;
  --v3-brand-2:#2e9b63;
  --v3-brand-soft:#e8f4ed;
  --v3-sidebar:#143b33;
  --v3-sidebar-2:#1b5145;
  --v3-shadow:0 18px 44px rgba(17,24,39,.06);
}

body.app-auth-body{
  background:linear-gradient(180deg,#f6f8f7 0%,#eef3f1 100%);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.app-shell-v3{
  min-height:100vh;
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
}

.app-sidebar-v3{
  position:sticky;
  top:0;
  height:100vh;
  background:linear-gradient(180deg,var(--v3-sidebar) 0%,var(--v3-sidebar-2) 100%);
  color:#fff;
  padding:22px 18px 18px;
  display:flex;
  flex-direction:column;
  border-right:1px solid rgba(255,255,255,.08);
}

.app-sidebar-brand{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:26px;
}

.brand-link-v3{
  display:inline-flex;
  align-items:center;
}

.brand-logo-v3{
  width:46px;
  height:46px;
  object-fit:contain;
  display:block;
}

.brand-meta-v3 strong{
  display:block;
  font-size:1rem;
  line-height:1.15;
}

.brand-meta-v3 span{
  display:block;
  margin-top:4px;
  font-size:.83rem;
  color:rgba(255,255,255,.68);
}

.app-nav-v3{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.app-nav-v3 a,
.logout-link-v3,
.install-btn-v3{
  display:flex;
  align-items:center;
  min-height:46px;
  padding:0 14px;
  border-radius:14px;
  color:rgba(255,255,255,.82);
  text-decoration:none;
  font-weight:650;
  font-size:.95rem;
  border:1px solid transparent;
  background:transparent;
}

.app-nav-v3 a:hover,
.app-nav-v3 a.active,
.logout-link-v3:hover,
.install-btn-v3:hover{
  background:rgba(255,255,255,.10);
  color:#fff;
  border-color:rgba(255,255,255,.08);
}

.app-sidebar-foot{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.app-content-v3{
  min-width:0;
  display:flex;
  flex-direction:column;
}

.app-topbar-v3{
  position:sticky;
  top:0;
  z-index:40;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:76px;
  padding:0 26px;
  background:rgba(246,248,247,.90);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--v3-line);
}

.app-topbar-title strong{
  display:block;
  font-size:1rem;
  color:var(--v3-text);
}

.app-topbar-title span{
  display:block;
  margin-top:3px;
  font-size:.82rem;
  color:var(--v3-muted);
}

.app-topbar-actions{
  display:flex;
  gap:10px;
}

.topbar-btn-v3{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 14px;
  border-radius:12px;
  text-decoration:none;
  border:1px solid var(--v3-line);
  background:#fff;
  color:var(--v3-text);
  font-weight:650;
  font-size:.9rem;
}

.topbar-btn-v3-primary{
  background:linear-gradient(135deg,var(--v3-brand) 0%,var(--v3-brand-2) 100%);
  color:#fff;
  border-color:transparent;
}

.menu-toggle-v3{
  display:none;
  width:44px;
  height:44px;
  border:1px solid var(--v3-line);
  background:#fff;
  border-radius:12px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
  cursor:pointer;
}

.menu-toggle-v3 span{
  width:18px;
  height:2px;
  border-radius:4px;
  background:var(--v3-text);
  display:block;
}

.app-main-v3{
  padding:26px;
}

.guest-header-v3{
  position:sticky;
  top:0;
  z-index:30;
  min-height:74px;
  background:#fff;
  border-bottom:1px solid var(--v3-line);
}

.guest-header-inner{
  max-width:1180px;
  margin:0 auto;
  min-height:74px;
  display:flex;
  align-items:center;
  padding:0 22px;
}

.guest-main-v3{
  max-width:1180px;
  margin:0 auto;
  padding:26px 22px 40px;
}

.ops-head-v3{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.ops-title-v3{
  margin:8px 0 10px;
  font-size:2.4rem;
  line-height:1.02;
  letter-spacing:-.05em;
  color:var(--v3-text);
}

.ops-copy-v3{
  margin:0;
  max-width:720px;
  color:var(--v3-muted);
  font-size:1rem;
  line-height:1.6;
}

.eyebrow-plain{
  display:inline-block;
  padding:0;
  border-radius:0;
  background:none;
  color:var(--v3-brand);
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.ops-head-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.kpi-ribbon-v3{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.kpi-item-v3{
  background:rgba(255,255,255,.92);
  border:1px solid var(--v3-line);
  border-radius:18px;
  padding:16px 16px 14px;
  box-shadow:var(--v3-shadow);
}

.kpi-item-v3 span{
  display:block;
  margin-bottom:8px;
  font-size:.78rem;
  color:var(--v3-muted);
}

.kpi-item-v3 strong{
  display:block;
  font-size:1.28rem;
  line-height:1.1;
  letter-spacing:-.03em;
  color:var(--v3-text);
}

.ops-layout-v3{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) 360px;
  gap:18px;
  margin-bottom:18px;
}

.ops-main-v3{
  display:grid;
  gap:18px;
}

.ops-side-v3{
  display:grid;
  gap:18px;
  align-content:start;
}

.ops-panel-v3{
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:24px;
  padding:22px;
  box-shadow:var(--v3-shadow);
}

.ops-panel-v3-large{
  min-height:320px;
}

.ops-panel-head-v3{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
}

.ops-panel-head-v3 h2{
  margin:8px 0 0;
  font-size:1.7rem;
  line-height:1.08;
  letter-spacing:-.04em;
}

.panel-note-v3{
  color:var(--v3-muted);
  font-size:.82rem;
  white-space:nowrap;
}

.ops-bars-v3,
.finance-bars-v3{
  display:grid;
  gap:16px;
}

.ops-bar-row-v3{
  display:grid;
  grid-template-columns:120px 1fr auto;
  gap:14px;
  align-items:center;
}

.ops-bar-row-v3 label{
  font-weight:700;
  color:var(--v3-text);
}

.ops-bar-row-v3 strong{
  font-size:.98rem;
  color:var(--v3-text);
}

.ops-bar-v3{
  height:14px;
  border-radius:999px;
  background:#edf3f0;
  overflow:hidden;
}

.ops-bar-v3 span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg,var(--v3-brand) 0%,var(--v3-brand-2) 100%);
}

.ops-bar-v3-finance span{
  background:linear-gradient(135deg,#1f7a4c 0%,#4fb47d 100%);
}

.ops-bar-v3-expense span{
  background:linear-gradient(135deg,#c46f3f 0%,#e2aa64 100%);
}

.ops-bar-v3-net span{
  background:linear-gradient(135deg,#244f77 0%,#3e88c2 100%);
}

.finance-row-v3{
  display:grid;
  gap:8px;
}

.finance-label-v3{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.finance-label-v3 span{
  color:var(--v3-muted);
  font-size:.88rem;
}

.finance-label-v3 strong{
  color:var(--v3-text);
  font-size:1rem;
}

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

.ops-list-item-v3{
  padding:14px 14px 13px;
  border:1px solid var(--v3-line);
  border-radius:16px;
  background:var(--v3-panel-soft);
}

.ops-list-item-v3 strong{
  display:block;
  margin-bottom:5px;
  font-size:.96rem;
  color:var(--v3-text);
}

.ops-list-item-v3 span{
  display:block;
  color:var(--v3-muted);
  font-size:.92rem;
  line-height:1.5;
}

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

.module-item-v3{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:start;
  text-decoration:none;
  color:inherit;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:var(--v3-panel-soft);
}

.module-item-v3 strong{
  display:block;
  margin-bottom:4px;
  font-size:.96rem;
}

.module-item-v3 span{
  display:block;
  color:var(--v3-muted);
  font-size:.88rem;
  line-height:1.45;
}

.module-item-v3 em{
  font-style:normal;
  color:var(--v3-brand);
  font-weight:700;
  font-size:.84rem;
  white-space:nowrap;
}

.ops-bottom-v3{
  display:grid;
  gap:18px;
}

.action-grid-v3{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.action-tile-v3{
  display:block;
  padding:18px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:var(--v3-panel-soft);
  text-decoration:none;
  color:inherit;
}

.action-tile-v3 strong{
  display:block;
  margin-bottom:6px;
  font-size:1rem;
  color:var(--v3-text);
}

.action-tile-v3 span{
  display:block;
  color:var(--v3-muted);
  font-size:.9rem;
  line-height:1.5;
}

@media (max-width:1200px){
  .kpi-ribbon-v3{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .action-grid-v3{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:960px){
  .app-shell-v3{
    grid-template-columns:1fr;
  }

  .app-sidebar-v3{
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    width:280px;
    transform:translateX(-100%);
    transition:transform .2s ease;
    z-index:95;
  }

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

  .menu-toggle-v3{
    display:flex;
  }

  .ops-layout-v3{
    grid-template-columns:1fr;
  }

  .ops-head-v3{
    flex-direction:column;
    align-items:flex-start;
  }

  .app-topbar-actions{
    display:none;
  }
}

@media (max-width:720px){
  .app-main-v3{
    padding:18px;
  }

  .kpi-ribbon-v3{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .action-grid-v3{
    grid-template-columns:1fr;
  }

  .ops-bar-row-v3{
    grid-template-columns:1fr;
  }

  .finance-label-v3{
    flex-direction:column;
    align-items:flex-start;
  }

  .ops-title-v3{
    font-size:2rem;
  }
}
/* ===== END DASHBOARD V3 CONTROL ROOM ===== */

/* ===== FARM BRAND BADGE ===== */
.brand-badge-v3{
  width:46px;
  height:46px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#2a8d5a 0%,#4eb57d 100%);
  color:#ffffff;
  font-size:1.15rem;
  font-weight:800;
  letter-spacing:-0.02em;
  box-shadow:0 10px 24px rgba(0,0,0,.14);
}
/* ===== END FARM BRAND BADGE ===== */

/* ===== DASHBOARD V4 OPERATIONS WORKSPACE ===== */
.dash-v4-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.dash-v4-title{
  margin:8px 0 10px;
  font-size:2.35rem;
  line-height:1.02;
  letter-spacing:-.05em;
  color:var(--v3-text);
}

.dash-v4-copy{
  margin:0;
  max-width:760px;
  color:var(--v3-muted);
  font-size:1rem;
  line-height:1.6;
}

.dash-v4-head-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.dash-v4-kpis{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.dash-v4-kpi{
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--v3-shadow);
}

.dash-v4-kpi span{
  display:block;
  margin-bottom:8px;
  color:var(--v3-muted);
  font-size:.78rem;
}

.dash-v4-kpi strong{
  display:block;
  color:var(--v3-text);
  font-size:1.28rem;
  line-height:1.1;
  letter-spacing:-.03em;
}

.dash-v4-grid{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) 330px;
  gap:18px;
  align-items:start;
}

.dash-v4-main,
.dash-v4-side{
  display:grid;
  gap:18px;
}

.dash-card-v4{
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:24px;
  padding:22px;
  box-shadow:var(--v3-shadow);
}

.dash-card-v4-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.dash-card-v4-head h2{
  margin:8px 0 0;
  font-size:1.7rem;
  line-height:1.06;
  letter-spacing:-.04em;
  color:var(--v3-text);
}

.dash-card-v4-note{
  color:var(--v3-muted);
  font-size:.82rem;
  white-space:nowrap;
}

.species-bars-v4{
  display:grid;
  gap:16px;
}

.species-row-v4{
  display:grid;
  gap:8px;
}

.species-row-v4-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.species-row-v4-meta strong{
  color:var(--v3-text);
  font-size:.98rem;
}

.species-row-v4-meta span{
  color:var(--v3-muted);
  font-size:.88rem;
}

.species-track-v4,
.finance-track-v4{
  height:14px;
  border-radius:999px;
  background:#e8efeb;
  overflow:hidden;
}

.species-track-v4 span,
.finance-track-v4 span{
  display:block;
  height:100%;
  border-radius:999px;
}

.species-track-v4 span{
  background:linear-gradient(135deg,#1f7a4c 0%,#36a46a 100%);
}

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

.recent-card-v4{
  border:1px solid var(--v3-line);
  background:#f8faf8;
  border-radius:18px;
  padding:16px;
}

.recent-card-v4-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.recent-card-v4-top strong{
  color:var(--v3-text);
  font-size:.96rem;
}

.recent-card-v4-top span{
  color:var(--v3-brand);
  font-size:.82rem;
  font-weight:700;
  text-transform:capitalize;
}

.recent-card-v4-meta{
  display:grid;
  gap:6px;
}

.recent-card-v4-meta span{
  color:var(--v3-muted);
  font-size:.88rem;
}

.finance-layout-v4{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);
  gap:18px;
  align-items:start;
}

.finance-bars-v4{
  display:grid;
  gap:16px;
}

.finance-row-v4{
  display:grid;
  gap:8px;
}

.finance-row-v4-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.finance-row-v4-label span{
  color:var(--v3-muted);
  font-size:.88rem;
}

.finance-row-v4-label strong{
  color:var(--v3-text);
  font-size:1rem;
}

.finance-track-v4-income span{
  background:linear-gradient(135deg,#1f7a4c 0%,#48b677 100%);
}

.finance-track-v4-expense span{
  background:linear-gradient(135deg,#d28a44 0%,#ebb16a 100%);
}

.finance-track-v4-net span{
  background:linear-gradient(135deg,#29588a 0%,#4c8ed1 100%);
}

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

.finance-list-v4 h3{
  margin:0 0 2px;
  font-size:1rem;
  color:var(--v3-text);
}

.finance-entry-v4{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.finance-entry-v4 strong{
  display:block;
  margin-bottom:4px;
  color:var(--v3-text);
  font-size:.94rem;
}

.finance-entry-v4 span{
  display:block;
  color:var(--v3-muted);
  font-size:.86rem;
}

.finance-entry-v4 em{
  font-style:normal;
  font-size:.84rem;
  font-weight:700;
  white-space:nowrap;
}

.finance-entry-v4 em.income{
  color:#1f7a4c;
}

.finance-entry-v4 em.expense{
  color:#c17836;
}

.focus-list-v4,
.timeline-list-v4,
.module-list-v4,
.action-grid-v4{
  display:grid;
  gap:12px;
}

.focus-item-v4{
  padding:16px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.focus-item-v4 strong{
  display:block;
  margin-bottom:6px;
  color:var(--v3-text);
  font-size:.96rem;
}

.focus-item-v4 span{
  display:block;
  color:var(--v3-muted);
  font-size:.9rem;
  line-height:1.55;
}

.timeline-item-v4{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.timeline-item-v4 strong{
  display:block;
  margin-bottom:4px;
  color:var(--v3-text);
  font-size:.94rem;
}

.timeline-item-v4 span{
  display:block;
  color:var(--v3-muted);
  font-size:.86rem;
}

.timeline-item-v4 em{
  font-style:normal;
  color:var(--v3-brand);
  font-size:.82rem;
  font-weight:700;
  white-space:nowrap;
}

.module-list-v4{
  gap:10px;
}

.module-item-v4{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:start;
  text-decoration:none;
  color:inherit;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.module-item-v4 strong{
  display:block;
  margin-bottom:4px;
  color:var(--v3-text);
  font-size:.95rem;
}

.module-item-v4 span{
  display:block;
  color:var(--v3-muted);
  font-size:.88rem;
  line-height:1.45;
}

.module-item-v4 em{
  font-style:normal;
  color:var(--v3-brand);
  font-size:.82rem;
  font-weight:700;
  white-space:nowrap;
}

.action-grid-v4{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.action-tile-v4{
  display:block;
  padding:16px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
  text-decoration:none;
  color:inherit;
}

.action-tile-v4 strong{
  display:block;
  margin-bottom:6px;
  color:var(--v3-text);
  font-size:.98rem;
}

.action-tile-v4 span{
  display:block;
  color:var(--v3-muted);
  font-size:.9rem;
  line-height:1.5;
}

.empty-note-v4{
  padding:16px;
  border-radius:16px;
  border:1px dashed var(--v3-line);
  background:#fbfcfb;
  color:var(--v3-muted);
  font-size:.9rem;
}

@media (max-width:1320px){
  .dash-v4-kpis{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .dash-v4-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:1024px){
  .finance-layout-v4{
    grid-template-columns:1fr;
  }
}

@media (max-width:820px){
  .dash-v4-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .recent-grid-v4,
  .action-grid-v4{
    grid-template-columns:1fr;
  }
}

@media (max-width:720px){
  .dash-v4-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .dash-v4-title{
    font-size:2rem;
  }

  .finance-entry-v4,
  .timeline-item-v4,
  .species-row-v4-meta,
  .finance-row-v4-label{
    flex-direction:column;
    align-items:flex-start;
  }
}
/* ===== END DASHBOARD V4 OPERATIONS WORKSPACE ===== */

/* ===== DASHBOARD V5 OPERATIONS WORKSPACE ===== */
.app-shell-v3{
  min-height:100vh;
  display:block;
}

.app-sidebar-v3{
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  width:280px;
  height:auto;
  overflow-y:auto;
  z-index:90;
  padding:22px 18px 18px;
}

.app-content-v3{
  margin-left:280px;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.app-main-v3{
  padding:26px;
}

.app-nav-group-v5{
  margin-bottom:18px;
}

.app-nav-title-v5{
  display:block;
  margin:0 12px 8px;
  color:rgba(255,255,255,.56);
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.app-nav-static-v5{
  display:grid;
  gap:8px;
}

.app-nav-static-v5 span{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:42px;
  padding:0 14px;
  border-radius:12px;
  color:rgba(255,255,255,.72);
  background:rgba(255,255,255,.04);
  font-size:.92rem;
  font-weight:600;
}

.app-nav-static-v5 em{
  font-style:normal;
  color:#8ad7ab;
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.dash-v5-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.dash-v5-title{
  margin:8px 0 10px;
  font-size:2.35rem;
  line-height:1.02;
  letter-spacing:-.05em;
  color:var(--v3-text);
}

.dash-v5-copy{
  margin:0;
  max-width:760px;
  color:var(--v3-muted);
  font-size:1rem;
  line-height:1.6;
}

.dash-v5-head-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.dash-v5-kpis{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.dash-v5-kpi{
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--v3-shadow);
}

.dash-v5-kpi span{
  display:block;
  margin-bottom:8px;
  color:var(--v3-muted);
  font-size:.78rem;
}

.dash-v5-kpi strong{
  display:block;
  color:var(--v3-text);
  font-size:1.28rem;
  line-height:1.1;
  letter-spacing:-.03em;
}

.dash-v5-grid{
  display:grid;
  grid-template-columns:minmax(0,1.58fr) 330px;
  gap:18px;
  align-items:start;
}

.dash-v5-main,
.dash-v5-side{
  display:grid;
  gap:18px;
}

.dash-card-v5{
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:24px;
  padding:22px;
  box-shadow:var(--v3-shadow);
}

.dash-card-v5-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.dash-card-v5-head h2{
  margin:8px 0 0;
  font-size:1.7rem;
  line-height:1.06;
  letter-spacing:-.04em;
  color:var(--v3-text);
}

.dash-card-v5-note{
  color:var(--v3-muted);
  font-size:.82rem;
  white-space:nowrap;
}

.species-bars-v5{
  display:grid;
  gap:16px;
}

.species-row-v5{
  display:grid;
  gap:8px;
}

.species-row-v5-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.species-row-v5-meta strong{
  color:var(--v3-text);
  font-size:.98rem;
}

.species-row-v5-meta span{
  color:var(--v3-muted);
  font-size:.88rem;
}

.species-track-v5,
.finance-track-v5{
  height:14px;
  border-radius:999px;
  background:#e8efeb;
  overflow:hidden;
}

.species-track-v5 span,
.finance-track-v5 span{
  display:block;
  height:100%;
  border-radius:999px;
}

.species-track-v5 span{
  background:linear-gradient(135deg,#1f7a4c 0%,#36a46a 100%);
}

.donut-grid-v5{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.donut-card-v5{
  display:grid;
  justify-items:center;
  gap:10px;
  padding:16px;
  border:1px solid var(--v3-line);
  border-radius:18px;
  background:#f8faf8;
  text-align:center;
}

.donut-v5{
  --pct:50;
  --accent:#1f7a4c;
  width:122px;
  height:122px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:
    radial-gradient(closest-side, #ffffff 68%, transparent 69% 100%),
    conic-gradient(var(--accent) calc(var(--pct) * 1%), #e7eeea 0);
}

.donut-v5 span{
  color:var(--v3-text);
  font-size:1.1rem;
  font-weight:800;
  letter-spacing:-.03em;
}

.donut-card-v5 strong{
  color:var(--v3-text);
  font-size:.95rem;
}

.donut-card-v5 > span{
  color:var(--v3-muted);
  font-size:.88rem;
  line-height:1.45;
}

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

.recent-card-v5{
  border:1px solid var(--v3-line);
  background:#f8faf8;
  border-radius:18px;
  padding:16px;
}

.recent-card-v5-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.recent-card-v5-top strong{
  color:var(--v3-text);
  font-size:.96rem;
}

.recent-card-v5-top span{
  color:var(--v3-brand);
  font-size:.82rem;
  font-weight:700;
  text-transform:capitalize;
}

.recent-card-v5-meta{
  display:grid;
  gap:6px;
}

.recent-card-v5-meta span{
  color:var(--v3-muted);
  font-size:.88rem;
}

.finance-layout-v5{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);
  gap:18px;
  align-items:start;
}

.finance-bars-v5{
  display:grid;
  gap:16px;
}

.finance-row-v5{
  display:grid;
  gap:8px;
}

.finance-row-v5-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.finance-row-v5-label span{
  color:var(--v3-muted);
  font-size:.88rem;
}

.finance-row-v5-label strong{
  color:var(--v3-text);
  font-size:1rem;
}

.finance-track-v5-income span{
  background:linear-gradient(135deg,#1f7a4c 0%,#48b677 100%);
}

.finance-track-v5-expense span{
  background:linear-gradient(135deg,#d28a44 0%,#ebb16a 100%);
}

.finance-track-v5-net span{
  background:linear-gradient(135deg,#29588a 0%,#4c8ed1 100%);
}

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

.finance-list-v5 h3{
  margin:0 0 2px;
  font-size:1rem;
  color:var(--v3-text);
}

.finance-entry-v5{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.finance-entry-v5 strong{
  display:block;
  margin-bottom:4px;
  color:var(--v3-text);
  font-size:.94rem;
}

.finance-entry-v5 span{
  display:block;
  color:var(--v3-muted);
  font-size:.86rem;
}

.finance-entry-v5 em{
  font-style:normal;
  font-size:.84rem;
  font-weight:700;
  white-space:nowrap;
}

.finance-entry-v5 em.income{
  color:#1f7a4c;
}

.finance-entry-v5 em.expense{
  color:#c17836;
}

.focus-list-v5,
.timeline-list-v5,
.module-list-v5,
.roadmap-list-v5{
  display:grid;
  gap:12px;
}

.focus-item-v5{
  padding:16px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.focus-item-v5 strong{
  display:block;
  margin-bottom:6px;
  color:var(--v3-text);
  font-size:.96rem;
}

.focus-item-v5 span{
  display:block;
  color:var(--v3-muted);
  font-size:.9rem;
  line-height:1.55;
}

.timeline-item-v5{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.timeline-item-v5 strong{
  display:block;
  margin-bottom:4px;
  color:var(--v3-text);
  font-size:.94rem;
}

.timeline-item-v5 span{
  display:block;
  color:var(--v3-muted);
  font-size:.86rem;
}

.timeline-item-v5 em{
  font-style:normal;
  color:var(--v3-brand);
  font-size:.82rem;
  font-weight:700;
  white-space:nowrap;
}

.module-list-v5{
  gap:10px;
}

.module-item-v5{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:start;
  text-decoration:none;
  color:inherit;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.module-item-v5 strong{
  display:block;
  margin-bottom:4px;
  color:var(--v3-text);
  font-size:.95rem;
}

.module-item-v5 span{
  display:block;
  color:var(--v3-muted);
  font-size:.88rem;
  line-height:1.45;
}

.module-item-v5 em{
  font-style:normal;
  color:var(--v3-brand);
  font-size:.82rem;
  font-weight:700;
  white-space:nowrap;
}

.roadmap-item-v5{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.roadmap-item-v5 strong{
  display:block;
  margin-bottom:4px;
  color:var(--v3-text);
  font-size:.95rem;
}

.roadmap-item-v5 span{
  display:block;
  color:var(--v3-muted);
  font-size:.88rem;
  line-height:1.45;
}

.roadmap-item-v5 em{
  font-style:normal;
  color:#6e7b84;
  font-size:.8rem;
  font-weight:800;
  white-space:nowrap;
  text-transform:uppercase;
}

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

.action-tile-v5{
  display:block;
  padding:16px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
  text-decoration:none;
  color:inherit;
}

.action-tile-v5 strong{
  display:block;
  margin-bottom:6px;
  color:var(--v3-text);
  font-size:.98rem;
}

.action-tile-v5 span{
  display:block;
  color:var(--v3-muted);
  font-size:.9rem;
  line-height:1.5;
}

.empty-note-v5{
  padding:16px;
  border-radius:16px;
  border:1px dashed var(--v3-line);
  background:#fbfcfb;
  color:var(--v3-muted);
  font-size:.9rem;
}

@media (max-width:1320px){
  .dash-v5-kpis{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .dash-v5-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:1100px){
  .donut-grid-v5{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .finance-layout-v5{
    grid-template-columns:1fr;
  }
}

@media (max-width:960px){
  .app-shell-v3{
    display:block;
  }

  .app-sidebar-v3{
    position:fixed;
    transform:translateX(-100%);
    transition:transform .2s ease;
    width:280px;
  }

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

  .app-content-v3{
    margin-left:0;
  }

  .menu-toggle-v3{
    display:flex;
  }

  .app-topbar-actions{
    display:none;
  }
}

@media (max-width:820px){
  .dash-v5-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .recent-grid-v5,
  .action-grid-v5{
    grid-template-columns:1fr;
  }
}

@media (max-width:720px){
  .dash-v5-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .donut-grid-v5{
    grid-template-columns:1fr;
  }

  .dash-v5-title{
    font-size:2rem;
  }

  .finance-entry-v5,
  .timeline-item-v5,
  .roadmap-item-v5,
  .species-row-v5-meta,
  .finance-row-v5-label{
    flex-direction:column;
    align-items:flex-start;
  }
}
/* ===== END DASHBOARD V5 OPERATIONS WORKSPACE ===== */

/* ===== SIDEBAR GROUP CLARITY V6 ===== */
.app-sidebar-v3{
  background:
    linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.00) 18%),
    linear-gradient(180deg,#143b33 0%,#18463d 100%);
}

.app-sidebar-brand{
  padding-bottom:16px;
  margin-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.app-nav-group-v5{
  position:relative;
  margin:0 0 16px;
  padding:14px 10px 12px;
  border-radius:18px;
  background:rgba(255,255,255,.025);
  border:1px solid rgba(255,255,255,.06);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.app-nav-group-v5 + .app-nav-group-v5{
  margin-top:2px;
}

.app-nav-title-v5{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 4px 10px;
  padding:0 0 10px;
  color:rgba(255,255,255,.60);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
  border-bottom:1px solid rgba(255,255,255,.07);
}

.app-nav-title-v5::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:rgba(138,215,171,.95);
  box-shadow:0 0 0 6px rgba(138,215,171,.08);
  flex:0 0 auto;
}

.app-nav-v3{
  gap:6px;
}

.app-nav-v3 a,
.logout-link-v3,
.install-btn-v3{
  min-height:42px;
  padding:0 12px;
  border-radius:12px;
  font-size:.93rem;
}

.app-nav-v3 a{
  position:relative;
  color:rgba(255,255,255,.84);
}

.app-nav-v3 a::before{
  content:"";
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:3px;
  border-radius:999px;
  background:transparent;
  transition:background .18s ease;
}

.app-nav-v3 a:hover{
  background:rgba(255,255,255,.08);
}

.app-nav-v3 a.active{
  background:rgba(255,255,255,.11);
  border-color:rgba(255,255,255,.10);
  color:#ffffff;
}

.app-nav-v3 a.active::before{
  background:#8ad7ab;
}

.app-nav-static-v5{
  gap:8px;
}

.app-nav-static-v5 span{
  min-height:40px;
  padding:0 12px;
  border-radius:12px;
  color:rgba(255,255,255,.78);
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.05);
  font-size:.9rem;
}

.app-nav-static-v5 em{
  color:#8ad7ab;
  font-size:.74rem;
  letter-spacing:.08em;
}

.app-sidebar-foot{
  margin-top:10px;
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,.08);
}

@media (max-width:960px){
  .app-nav-group-v5{
    margin-bottom:14px;
  }
}
/* ===== END SIDEBAR GROUP CLARITY V6 ===== */

/* ===== DASHBOARD CLICKABLE CARDS V6 ===== */
.dash-v5-kpi-link{
  display:block;
  text-decoration:none;
  color:inherit;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.dash-v5-kpi-link:hover{
  transform:translateY(-1px);
  border-color:#c3d7cc;
  box-shadow:0 16px 32px rgba(17,24,39,.07);
}

.focus-item-v5-link{
  display:block;
  text-decoration:none;
  color:inherit;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.focus-item-v5-link:hover{
  transform:translateY(-1px);
  border-color:#c3d7cc;
  box-shadow:0 16px 32px rgba(17,24,39,.07);
}
/* ===== END DASHBOARD CLICKABLE CARDS V6 ===== */

/* ===== LIVESTOCK WORKSPACE V7 ===== */
.livestock-home-v7-head,
.species-head-v7{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.livestock-home-v7-title,
.species-title-v7{
  margin:8px 0 10px;
  font-size:2.25rem;
  line-height:1.03;
  letter-spacing:-.05em;
  color:var(--v3-text);
}

.livestock-home-v7-copy,
.species-copy-v7{
  margin:0;
  max-width:760px;
  color:var(--v3-muted);
  font-size:1rem;
  line-height:1.6;
}

.livestock-home-v7-actions,
.species-head-actions-v7{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.livestock-home-v7-kpis,
.species-kpis-v7{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.livestock-home-v7-kpi,
.species-kpi-v7{
  display:block;
  text-decoration:none;
  color:inherit;
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--v3-shadow);
}

.species-kpi-v7{
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.species-kpi-v7:hover{
  transform:translateY(-1px);
  border-color:#c3d7cc;
  box-shadow:0 16px 32px rgba(17,24,39,.07);
}

.livestock-home-v7-kpi span,
.species-kpi-v7 span{
  display:block;
  margin-bottom:8px;
  color:var(--v3-muted);
  font-size:.78rem;
}

.livestock-home-v7-kpi strong,
.species-kpi-v7 strong{
  display:block;
  color:var(--v3-text);
  font-size:1.25rem;
  line-height:1.1;
  letter-spacing:-.03em;
}

.species-kpi-v7 small{
  display:block;
  margin-top:6px;
  color:var(--v3-muted);
  font-size:.84rem;
}

.livestock-home-v7-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}

.livestock-card-v7,
.species-panel-v7{
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:24px;
  padding:22px;
  box-shadow:var(--v3-shadow);
}

.livestock-card-v7-top,
.species-panel-v7-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

.livestock-card-v7-top h2,
.species-panel-v7-head h2{
  margin:8px 0 0;
  font-size:1.7rem;
  line-height:1.06;
  letter-spacing:-.04em;
  color:var(--v3-text);
}

.livestock-card-v7-count,
.species-note-v7{
  color:var(--v3-muted);
  font-size:.82rem;
  white-space:nowrap;
}

.livestock-card-v7-copy{
  color:var(--v3-muted);
  font-size:.96rem;
  line-height:1.6;
  margin:0 0 14px;
}

.livestock-card-v7-stats{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.livestock-card-v7-stats span{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  background:#f1f6f3;
  border:1px solid var(--v3-line);
  color:var(--v3-text);
  font-size:.84rem;
  font-weight:650;
}

.livestock-card-v7-links{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.livestock-card-v7-links a{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  border-radius:12px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
  color:var(--v3-text);
  text-decoration:none;
  font-weight:650;
  font-size:.9rem;
}

.species-layout-v7{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) 360px;
  gap:18px;
}

.species-main-v7,
.species-side-v7{
  display:grid;
  gap:18px;
}

.species-bars-v7{
  display:grid;
  gap:16px;
}

.species-bar-row-v7{
  display:grid;
  gap:8px;
}

.species-bar-meta-v7{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.species-bar-meta-v7 strong{
  color:var(--v3-text);
  font-size:.98rem;
}

.species-bar-meta-v7 span{
  color:var(--v3-muted);
  font-size:.88rem;
}

.species-track-v7{
  height:14px;
  border-radius:999px;
  background:#e8efeb;
  overflow:hidden;
}

.species-track-v7 span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg,#1f7a4c 0%,#36a46a 100%);
}

.species-track-v7-blue span{
  background:linear-gradient(135deg,#2f6ea8 0%,#4c95da 100%);
}

.species-track-v7-amber span{
  background:linear-gradient(135deg,#d28a44 0%,#ebb16a 100%);
}

.species-module-grid-v7{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.species-module-card-v7{
  display:block;
  padding:16px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
  text-decoration:none;
  color:inherit;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.species-module-card-v7:hover{
  transform:translateY(-1px);
  border-color:#c3d7cc;
  box-shadow:0 16px 32px rgba(17,24,39,.07);
}

.species-module-card-v7 strong{
  display:block;
  margin-bottom:6px;
  color:var(--v3-text);
  font-size:1rem;
}

.species-module-card-v7 span{
  display:block;
  color:var(--v3-muted);
  font-size:.9rem;
  line-height:1.5;
}

.species-module-card-v7 em{
  display:block;
  margin-top:10px;
  color:var(--v3-brand);
  font-style:normal;
  font-weight:700;
  font-size:.84rem;
}

.species-recent-grid-v7{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.species-recent-card-v7{
  display:block;
  padding:16px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
  text-decoration:none;
  color:inherit;
}

.species-recent-top-v7{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.species-recent-top-v7 strong{
  color:var(--v3-text);
  font-size:.96rem;
}

.species-recent-top-v7 span{
  color:var(--v3-brand);
  font-size:.82rem;
  font-weight:700;
}

.species-recent-meta-v7{
  display:grid;
  gap:6px;
}

.species-recent-meta-v7 span{
  color:var(--v3-muted);
  font-size:.88rem;
}

.species-side-list-v7{
  display:grid;
  gap:12px;
}

.species-side-item-v7{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
  text-decoration:none;
  color:inherit;
}

.species-side-item-v7 strong{
  display:block;
  margin-bottom:4px;
  color:var(--v3-text);
  font-size:.94rem;
}

.species-side-item-v7 span{
  display:block;
  color:var(--v3-muted);
  font-size:.86rem;
}

.species-side-item-v7 em{
  font-style:normal;
  color:var(--v3-brand);
  font-size:.82rem;
  font-weight:700;
  white-space:nowrap;
}

.empty-note-v7{
  padding:16px;
  border-radius:16px;
  border:1px dashed var(--v3-line);
  background:#fbfcfb;
  color:var(--v3-muted);
  font-size:.9rem;
}

@media (max-width:1320px){
  .livestock-home-v7-grid,
  .species-layout-v7{
    grid-template-columns:1fr;
  }

  .livestock-home-v7-kpis,
  .species-kpis-v7{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:900px){
  .livestock-home-v7-head,
  .species-head-v7{
    flex-direction:column;
    align-items:flex-start;
  }

  .species-module-grid-v7,
  .species-recent-grid-v7,
  .livestock-card-v7-links{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
  .livestock-home-v7-title,
  .species-title-v7{
    font-size:2rem;
  }

  .livestock-home-v7-kpis,
  .species-kpis-v7{
    grid-template-columns:1fr;
  }

  .species-side-item-v7,
  .species-bar-meta-v7,
  .species-recent-top-v7{
    flex-direction:column;
    align-items:flex-start;
  }
}
/* ===== END LIVESTOCK WORKSPACE V7 ===== */

/* ===== LIVESTOCK WORKSPACE V8 ===== */
.records-v8-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.records-v8-title{
  margin:8px 0 10px;
  font-size:2.2rem;
  line-height:1.03;
  letter-spacing:-.05em;
  color:var(--v3-text);
}

.records-v8-copy{
  margin:0;
  max-width:760px;
  color:var(--v3-muted);
  font-size:1rem;
  line-height:1.6;
}

.records-v8-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.records-v8-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.records-v8-kpi{
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--v3-shadow);
}

.records-v8-kpi span{
  display:block;
  margin-bottom:8px;
  color:var(--v3-muted);
  font-size:.78rem;
}

.records-v8-kpi strong{
  display:block;
  color:var(--v3-text);
  font-size:1.24rem;
  line-height:1.1;
  letter-spacing:-.03em;
}

.records-v8-list{
  display:grid;
  gap:14px;
}

.record-row-v8{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:16px;
  border-radius:22px;
  border:1px solid var(--v3-line);
  background:rgba(255,255,255,.94);
  box-shadow:var(--v3-shadow);
}

.record-main-v8{
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:16px;
  align-items:center;
  text-decoration:none;
  color:inherit;
}

.record-thumb-v8-wrap{
  position:relative;
  width:110px;
  height:90px;
  border-radius:18px;
  overflow:hidden;
  background:#eef3f0;
}

.record-thumb-v8{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.record-thumb-v8-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--v3-muted);
  font-size:.84rem;
}

.record-body-v8{
  min-width:0;
}

.record-body-v8-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.record-body-v8-top strong{
  color:var(--v3-text);
  font-size:1rem;
  line-height:1.2;
}

.record-body-v8-top span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#eef6f1;
  border:1px solid var(--v3-line);
  color:var(--v3-brand);
  font-size:.8rem;
  font-weight:700;
}

.record-meta-v8{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.record-meta-v8 span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  background:#f7faf8;
  border:1px solid var(--v3-line);
  color:var(--v3-muted);
  font-size:.84rem;
}

.record-actions-v8{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

@media (max-width:1320px){
  .records-v8-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:900px){
  .records-v8-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .record-row-v8{
    grid-template-columns:1fr;
  }

  .record-main-v8{
    grid-template-columns:1fr;
  }

  .record-thumb-v8-wrap{
    width:100%;
    height:180px;
  }

  .record-actions-v8{
    justify-content:flex-start;
  }
}

@media (max-width:640px){
  .records-v8-kpis{
    grid-template-columns:1fr;
  }

  .records-v8-title{
    font-size:1.95rem;
  }

  .record-body-v8-top{
    flex-direction:column;
    align-items:flex-start;
  }
}
/* ===== END LIVESTOCK WORKSPACE V8 ===== */

/* ===== SIDEBAR + LIVESTOCK CLICK TARGETS V10 ===== */
.app-nav-title-link-v10{
  text-decoration:none;
  color:rgba(255,255,255,.60);
  transition:color .16s ease, opacity .16s ease;
}

.app-nav-title-link-v10:hover{
  color:#ffffff;
}

.livestock-card-v7-toplink{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
  text-decoration:none;
  color:inherit;
  transition:transform .16s ease, opacity .16s ease;
}

.livestock-card-v7-toplink:hover{
  transform:translateY(-1px);
}

.livestock-card-v7-toplink h2{
  transition:color .16s ease;
}

.livestock-card-v7-toplink:hover h2{
  color:var(--v3-brand);
}
/* ===== END SIDEBAR + LIVESTOCK CLICK TARGETS V10 ===== */

/* ===== FINANCE WORKSPACE V10 ===== */
.finance-v10-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.finance-v10-title{
  margin:8px 0 10px;
  font-size:2.2rem;
  line-height:1.03;
  letter-spacing:-.05em;
  color:var(--v3-text);
}

.finance-v10-copy{
  margin:0;
  max-width:760px;
  color:var(--v3-muted);
  font-size:1rem;
  line-height:1.6;
}

.finance-v10-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.finance-v10-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

.finance-v10-kpi{
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--v3-shadow);
}

.finance-v10-kpi span{
  display:block;
  margin-bottom:8px;
  color:var(--v3-muted);
  font-size:.78rem;
}

.finance-v10-kpi strong{
  display:block;
  color:var(--v3-text);
  font-size:1.2rem;
  line-height:1.1;
  letter-spacing:-.03em;
}

.finance-v10-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:16px;
}

.finance-chip-v10{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:0 14px;
  border-radius:999px;
  background:#f5f8f6;
  border:1px solid var(--v3-line);
  color:var(--v3-text);
  text-decoration:none;
  font-size:.9rem;
  font-weight:700;
}

.finance-chip-v10.active{
  background:#eaf5ee;
  color:var(--v3-brand);
  border-color:#c8dfd2;
}

.finance-v10-table{
  display:grid;
  gap:10px;
}

.finance-v10-table-head{
  display:grid;
  grid-template-columns:110px 1.1fr .8fr 120px 140px 1.5fr 96px;
  gap:12px;
  padding:0 12px;
  color:var(--v3-muted);
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.finance-v10-row{
  display:grid;
  grid-template-columns:110px 1.1fr .8fr 120px 140px 1.5fr 96px;
  gap:12px;
  align-items:center;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:rgba(255,255,255,.94);
  box-shadow:var(--v3-shadow);
}

.finance-v10-col{
  min-width:0;
}

.finance-v10-col strong{
  color:var(--v3-text);
  font-size:.94rem;
}

.finance-v10-col span{
  color:var(--v3-muted);
  font-size:.9rem;
  line-height:1.45;
}

.finance-pill-v10{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  font-size:.76rem;
  font-weight:800;
  letter-spacing:.03em;
  text-transform:uppercase;
}

.finance-pill-v10.income{
  background:#e9f6ee;
  color:#1f7a4c;
  border:1px solid #cbe5d6;
}

.finance-pill-v10.expense{
  background:#fff0e7;
  color:#c8742c;
  border:1px solid #f0d3ba;
}

.finance-v10-amount{
  font-weight:800;
  font-size:.95rem;
}

.finance-v10-amount.income{
  color:#1f7a4c;
}

.finance-v10-amount.expense{
  color:#c8742c;
}

.finance-v10-notes span{
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.btn-danger-small{
  min-height:38px;
  padding:0 14px;
  border-radius:12px;
}

.finance-form-v10{
  display:block;
}

.finance-form-card-v10{
  display:grid;
  gap:16px;
  max-width:820px;
  padding:22px;
  border-radius:24px;
  border:1px solid var(--v3-line);
  background:rgba(255,255,255,.94);
  box-shadow:var(--v3-shadow);
}

.finance-field-v10{
  display:grid;
  gap:8px;
}

.finance-field-v10 label{
  color:var(--v3-text);
  font-size:.9rem;
  font-weight:700;
}

.finance-field-v10 input,
.finance-field-v10 select,
.finance-field-v10 textarea{
  width:100%;
  min-height:46px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--v3-line);
  background:#fbfcfb;
  color:var(--v3-text);
  font:inherit;
}

.finance-field-v10 textarea{
  min-height:120px;
  resize:vertical;
}

.finance-field-v10 small{
  color:var(--v3-muted);
  font-size:.82rem;
}

.finance-error-v10{
  color:#d1432a !important;
}

.finance-form-actions-v10{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:6px;
}

.empty-note-v10{
  padding:18px;
  border-radius:16px;
  border:1px dashed var(--v3-line);
  background:#fbfcfb;
  color:var(--v3-muted);
  font-size:.9rem;
}

@media (max-width:1320px){
  .finance-v10-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .finance-v10-table-head,
  .finance-v10-row{
    grid-template-columns:110px 1fr 120px 140px 1.1fr 96px;
  }

  .finance-v10-table-head > :nth-child(3),
  .finance-v10-row > :nth-child(3){
    display:none;
  }
}

@media (max-width:980px){
  .finance-v10-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .finance-v10-table-head{
    display:none;
  }

  .finance-v10-row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .finance-v10-action{
    margin-top:4px;
  }
}

@media (max-width:640px){
  .finance-v10-kpis{
    grid-template-columns:1fr;
  }

  .finance-v10-title{
    font-size:1.95rem;
  }
}
/* ===== END FINANCE WORKSPACE V10 ===== */

/* ===== FORMS + DETAIL UI V12 ===== */
.detail-v12-head,
.entry-form-v12-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.detail-v12-title,
.entry-form-v12-title{
  margin:8px 0 10px;
  font-size:2.15rem;
  line-height:1.03;
  letter-spacing:-.05em;
  color:var(--v3-text);
}

.detail-v12-copy,
.entry-form-v12-copy{
  margin:0;
  max-width:760px;
  color:var(--v3-muted);
  font-size:1rem;
  line-height:1.6;
}

.detail-v12-actions,
.entry-form-v12-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.detail-v12-hero{
  display:grid;
  grid-template-columns:340px minmax(0,1fr);
  gap:18px;
  margin-bottom:18px;
}

.detail-v12-photo,
.detail-v12-summary,
.detail-panel-v12,
.entry-form-v12-card{
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:24px;
  box-shadow:var(--v3-shadow);
}

.detail-v12-photo{
  overflow:hidden;
  min-height:320px;
}

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

.detail-v12-photo-empty{
  min-height:320px;
  display:grid;
  place-items:center;
  text-align:center;
  gap:8px;
  background:#f3f7f4;
  color:var(--v3-text);
}

.detail-v12-photo-empty strong{
  font-size:1.6rem;
  letter-spacing:-.03em;
}

.detail-v12-photo-empty span{
  color:var(--v3-muted);
  font-size:.92rem;
}

.detail-v12-summary{
  padding:22px;
}

.detail-v12-badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:16px;
}

.detail-v12-badges span{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  background:#eef6f1;
  border:1px solid var(--v3-line);
  color:var(--v3-brand);
  font-size:.84rem;
  font-weight:700;
}

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

.detail-v12-item{
  padding:14px;
  border-radius:18px;
  background:#f8faf8;
  border:1px solid var(--v3-line);
}

.detail-v12-item label{
  display:block;
  margin-bottom:6px;
  color:var(--v3-muted);
  font-size:.78rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.detail-v12-item strong{
  color:var(--v3-text);
  font-size:.96rem;
  line-height:1.35;
}

.detail-v12-notes{
  margin-top:14px;
  padding:16px;
  border-radius:18px;
  background:#f8faf8;
  border:1px solid var(--v3-line);
}

.detail-v12-notes label{
  display:block;
  margin-bottom:8px;
  color:var(--v3-muted);
  font-size:.78rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.detail-v12-notes p{
  margin:0;
  color:var(--v3-text);
  line-height:1.65;
}

.detail-v12-panels{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.detail-panel-v12{
  padding:22px;
}

.detail-panel-v12-head{
  margin-bottom:14px;
}

.detail-panel-v12-head h2{
  margin:8px 0 0;
  color:var(--v3-text);
  font-size:1.35rem;
  line-height:1.08;
  letter-spacing:-.04em;
}

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

.detail-list-item-v12{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.detail-list-item-v12 strong{
  display:block;
  margin-bottom:4px;
  color:var(--v3-text);
  font-size:.94rem;
}

.detail-list-item-v12 span{
  display:block;
  color:var(--v3-muted);
  font-size:.86rem;
}

.detail-list-item-v12 em{
  font-style:normal;
  color:var(--v3-brand);
  font-size:.82rem;
  font-weight:700;
  white-space:nowrap;
}

.entry-form-v12-wrap{
  display:block;
}

.entry-form-v12-card{
  padding:22px;
}

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

.entry-field-v12{
  display:grid;
  gap:8px;
}

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

.entry-field-v12 label{
  color:var(--v3-text);
  font-size:.9rem;
  font-weight:700;
}

.entry-field-v12 input,
.entry-field-v12 select,
.entry-field-v12 textarea{
  width:100%;
  min-height:46px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--v3-line);
  background:#fbfcfb;
  color:var(--v3-text);
  font:inherit;
}

.entry-field-v12 textarea{
  min-height:120px;
  resize:vertical;
}

.entry-field-v12 small{
  color:var(--v3-muted);
  font-size:.82rem;
}

.entry-error-v12{
  color:#d1432a !important;
}

.entry-form-v12-footer{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.empty-note-v12{
  padding:16px;
  border-radius:16px;
  border:1px dashed var(--v3-line);
  background:#fbfcfb;
  color:var(--v3-muted);
  font-size:.9rem;
}

@media (max-width:1320px){
  .detail-v12-panels{
    grid-template-columns:1fr;
  }

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

@media (max-width:900px){
  .detail-v12-head,
  .entry-form-v12-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .detail-v12-grid,
  .entry-form-v12-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
  .detail-v12-title,
  .entry-form-v12-title{
    font-size:1.9rem;
  }

  .detail-list-item-v12{
    flex-direction:column;
    align-items:flex-start;
  }
}
/* ===== END FORMS + DETAIL UI V12 ===== */

/* ===== COMPACT LOG TABLES V13 ===== */
.compactlog-v13-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.compactlog-v13-title{
  margin:8px 0 10px;
  font-size:2.05rem;
  line-height:1.03;
  letter-spacing:-.05em;
  color:var(--v3-text);
}

.compactlog-v13-copy{
  margin:0;
  max-width:760px;
  color:var(--v3-muted);
  font-size:1rem;
  line-height:1.6;
}

.compactlog-v13-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.compactlog-v13-table{
  display:grid;
  gap:10px;
}

.compactlog-v13-table-head{
  padding:0 12px;
  color:var(--v3-muted);
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.compactlog-v13-grid-breeding{
  display:grid;
  grid-template-columns:1fr 1fr 120px 120px 130px 90px 96px;
  gap:12px;
  align-items:center;
}

.compactlog-v13-grid-generic{
  display:grid;
  grid-template-columns:1fr 1fr 120px 120px 1.2fr 96px;
  gap:12px;
  align-items:center;
}

.compactlog-v13-row{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:rgba(255,255,255,.94);
  box-shadow:var(--v3-shadow);
}

.compactlog-v13-col{
  min-width:0;
}

.compactlog-v13-col strong{
  color:var(--v3-text);
  font-size:.95rem;
  line-height:1.25;
}

.compactlog-v13-col span{
  color:var(--v3-muted);
  font-size:.9rem;
  line-height:1.45;
  display:block;
}

.compactlog-v13-notes span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.compactlog-v13-action{
  display:flex;
  justify-content:flex-end;
}

.compactlog-pill-v13{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#eef6f1;
  border:1px solid var(--v3-line);
  color:var(--v3-brand) !important;
  font-size:.78rem !important;
  font-weight:800;
  white-space:nowrap;
}

@media (max-width:1320px){
  .compactlog-v13-grid-breeding{
    grid-template-columns:1fr 1fr 120px 120px 120px 96px;
  }

  .compactlog-v13-grid-breeding > :nth-child(6),
  .compactlog-v13-row.compactlog-v13-grid-breeding > :nth-child(6){
    display:none;
  }

  .compactlog-v13-grid-generic{
    grid-template-columns:1fr 1fr 120px 120px 96px;
  }

  .compactlog-v13-grid-generic > :nth-child(5),
  .compactlog-v13-row.compactlog-v13-grid-generic > :nth-child(5){
    display:none;
  }
}

@media (max-width:980px){
  .compactlog-v13-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .compactlog-v13-table-head{
    display:none;
  }

  .compactlog-v13-grid-breeding,
  .compactlog-v13-grid-generic,
  .compactlog-v13-row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .compactlog-v13-action{
    justify-content:flex-start;
    margin-top:4px;
  }
}

@media (max-width:640px){
  .compactlog-v13-title{
    font-size:1.9rem;
  }
}
/* ===== END COMPACT LOG TABLES V13 ===== */\n\n/* ===== ANIMAL AI ADVISOR V14 ===== */
.ai-v14-panel{
  margin:0 0 18px;
  padding:22px;
  border-radius:24px;
  border:1px solid var(--v3-line);
  background:rgba(255,255,255,.94);
  box-shadow:var(--v3-shadow);
}

.ai-v14-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.ai-v14-head h2{
  margin:8px 0 8px;
  color:var(--v3-text);
  font-size:1.45rem;
  line-height:1.06;
  letter-spacing:-.04em;
}

.ai-v14-head p{
  margin:0;
  max-width:780px;
  color:var(--v3-muted);
  line-height:1.6;
}

.ai-v14-status-group{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.ai-v14-status,
.ai-v14-coverage{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 12px;
  border-radius:999px;
  font-size:.82rem;
  font-weight:800;
  border:1px solid var(--v3-line);
}

.ai-v14-status.good{
  background:#e9f6ee;
  color:#1f7a4c;
}

.ai-v14-status.watch{
  background:#fff4e8;
  color:#b36d22;
}

.ai-v14-status.partial{
  background:#eef2f8;
  color:#43658a;
}

.ai-v14-coverage{
  background:#f8faf8;
  color:var(--v3-muted);
}

.ai-v14-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.ai-v14-card{
  padding:18px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:#f8faf8;
}

.ai-v14-card h3{
  margin:0 0 10px;
  color:var(--v3-text);
  font-size:1rem;
  line-height:1.15;
}

.ai-v14-card ul{
  margin:0;
  padding-left:18px;
  color:var(--v3-muted);
}

.ai-v14-card li{
  margin:0 0 8px;
  line-height:1.55;
}

.ai-v14-missing{
  margin-top:16px;
  padding:16px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:#fbfcfb;
}

.ai-v14-missing strong{
  display:block;
  margin-bottom:10px;
  color:var(--v3-text);
  font-size:.92rem;
}

.ai-v14-missing-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.ai-v14-missing-list span{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  background:#f1f5f2;
  border:1px solid var(--v3-line);
  color:var(--v3-muted);
  font-size:.82rem;
  font-weight:700;
}

@media (max-width:1100px){
  .ai-v14-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:900px){
  .ai-v14-head{
    flex-direction:column;
    align-items:flex-start;
  }
}
/* ===== END ANIMAL AI ADVISOR V14 ===== */\n

/* ===== PLAN UI V15 ===== */
.plan-chip-v15{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:0 10px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.14);
  color:rgba(255,255,255,.82);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  margin-top:8px;
}

[data-plan-hidden="1"]{
  display:none !important;
}
/* ===== END PLAN UI V15 ===== */

/* ===== ROADMAP VISUAL SEPARATION V16 ===== */
.roadmap-note-v16{
  display:block;
  margin:8px 0 0;
  color:rgba(255,255,255,.55);
  font-size:.72rem;
  line-height:1.45;
}

.roadmap-item-v16{
  position:relative;
  opacity:.88;
  filter:saturate(.82);
}

.roadmap-item-v16::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  pointer-events:none;
}

.roadmap-item-v16 a,
.roadmap-item-v16 button{
  cursor:default !important;
}

.roadmap-item-v16 .roadmap-chip-v16{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:0 9px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  color:#b7e7cf;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.roadmap-item-v16 .roadmap-title-v16{
  color:rgba(255,255,255,.88) !important;
}

.roadmap-item-v16 .roadmap-sub-v16{
  color:rgba(255,255,255,.48) !important;
}

.roadmap-item-v16 .roadmap-dots-v16{
  position:absolute;
  top:10px;
  right:10px;
  width:6px;
  height:6px;
  border-radius:999px;
  background:#9ed5b4;
  box-shadow:0 0 0 5px rgba(158,213,180,.08);
}

.roadmap-section-v16{
  border-top:1px dashed rgba(255,255,255,.10);
  padding-top:10px;
}
/* ===== END ROADMAP VISUAL SEPARATION V16 ===== */

/* ===== MODULE PREVIEW / UPGRADE UI V19 ===== */
.mod-v18-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.mod-v18-title{
  margin:8px 0 10px;
  font-size:2.15rem;
  line-height:1.03;
  letter-spacing:-.05em;
  color:var(--v3-text);
}

.mod-v18-copy{
  margin:0;
  max-width:760px;
  color:var(--v3-muted);
  font-size:1rem;
  line-height:1.6;
}

.mod-v18-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.mod-v18-plan-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 14px;
  border-radius:999px;
  background:#f4f8f5;
  border:1px solid var(--v3-line);
  color:var(--v3-text);
  font-size:.86rem;
  font-weight:800;
}

.mod-v18-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

.mod-v18-kpi{
  background:rgba(255,255,255,.94);
  border:1px solid var(--v3-line);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--v3-shadow);
}

.mod-v18-kpi span{
  display:block;
  margin-bottom:8px;
  color:var(--v3-muted);
  font-size:.78rem;
}

.mod-v18-kpi strong{
  display:block;
  color:var(--v3-text);
  font-size:1.2rem;
  line-height:1.1;
  letter-spacing:-.03em;
}

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

.mod-v18-card{
  padding:20px;
  border-radius:22px;
  border:1px solid var(--v3-line);
  background:rgba(255,255,255,.94);
  box-shadow:var(--v3-shadow);
}

.mod-v18-card h2{
  margin:0 0 12px;
  color:var(--v3-text);
  font-size:1.08rem;
}

.mod-v18-card ul{
  margin:0;
  padding-left:18px;
  color:var(--v3-muted);
}

.mod-v18-card li{
  margin-bottom:8px;
  line-height:1.55;
}

.mod-v18-card p{
  margin:0;
  color:var(--v3-muted);
  line-height:1.6;
}

.module-extra-v18{
  display:grid;
  gap:10px;
  margin-top:10px;
}

.module-extra-card-v18{
  position:relative;
  display:block;
  padding:14px 14px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  text-decoration:none;
  color:#fff;
  overflow:hidden;
}

.module-extra-card-v18.active{
  background:rgba(255,255,255,.07);
  border-color:rgba(255,255,255,.12);
}

.module-extra-card-v18.locked{
  background:rgba(255,255,255,.03);
  border-color:rgba(255,255,255,.07);
  opacity:.92;
}

.module-extra-card-v18 strong{
  display:block;
  color:rgba(255,255,255,.92);
  font-size:.92rem;
  line-height:1.2;
  margin-bottom:6px;
}

.module-extra-card-v18 small{
  display:block;
  color:rgba(255,255,255,.55);
  font-size:.73rem;
  line-height:1.45;
  margin-bottom:10px;
}

.module-extra-badge-v18{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:0 9px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.11);
  color:#b7e7cf;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.module-extra-card-v18.locked .module-extra-badge-v18{
  color:#d7e5dc;
}

@media (max-width:1100px){
  .mod-v18-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .mod-v18-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:900px){
  .mod-v18-head{
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width:640px){
  .mod-v18-kpis{
    grid-template-columns:1fr;
  }

  .mod-v18-title{
    font-size:1.95rem;
  }
}
/* ===== END MODULE PREVIEW / UPGRADE UI V19 ===== */

/* ===== INVENTORY / FINANCE FIX V20 ===== */
.module-extra-card-v18.active .module-extra-badge-v18{
  display:none;
}

.module-extra-card-v18.active small::after{
  content:" Open workspace";
  color:rgba(255,255,255,.78);
  font-weight:700;
}

.module-extra-card-v18.locked small::after{
  content:" Upgrade your plan to get it.";
  color:rgba(255,255,255,.72);
  font-weight:700;
}

.module-extra-card-v18{
  pointer-events:auto;
}

.finance-type-switch-v20{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 16px;
}

.finance-type-chip-v20{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid var(--v3-line);
  background:#f5f8f6;
  color:var(--v3-text);
  font-size:.86rem;
  font-weight:800;
  text-decoration:none;
}

.finance-type-chip-v20.active{
  background:#eaf5ee;
  color:var(--v3-brand);
  border-color:#d3e8da;
}
/* ===== END INVENTORY / FINANCE FIX V20 ===== */

/* ===== MODULE MVP V21 ===== */
.ops-v21-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.ops-v21-card{
  padding:20px;
  border-radius:22px;
  border:1px solid var(--v3-line);
  background:rgba(255,255,255,.94);
  box-shadow:var(--v3-shadow);
}

.ops-v21-card h2{
  margin:0 0 14px;
  color:var(--v3-text);
  font-size:1.08rem;
}

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

.ops-v21-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#fbfcfb;
  text-decoration:none;
}

.ops-v21-row strong{
  display:block;
  color:var(--v3-text);
  font-size:.95rem;
}

.ops-v21-row span{
  display:block;
  color:var(--v3-muted);
  font-size:.84rem;
  line-height:1.5;
  margin-top:4px;
}

.ops-v21-right{
  text-align:right;
  min-width:140px;
}

.ops-v21-link:hover{
  border-color:#d6e7dc;
  background:#f8fbf9;
}

@media (max-width:980px){
  .ops-v21-grid{
    grid-template-columns:1fr;
  }

  .ops-v21-row{
    flex-direction:column;
  }

  .ops-v21-right{
    text-align:left;
    min-width:0;
  }
}
/* ===== END MODULE MVP V21 ===== */

/* ===== DASHBOARD / RECORD CLICKS V22 ===== */
.dash-v22-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.dash-v22-title{
  margin:8px 0 10px;
  font-size:2.2rem;
  line-height:1.03;
  letter-spacing:-.05em;
  color:var(--v3-text);
}

.dash-v22-copy{
  margin:0;
  max-width:760px;
  color:var(--v3-muted);
  line-height:1.6;
}

.dash-v22-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.dash-v22-kpis{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

.dash-v22-kpi{
  display:block;
  padding:16px;
  border-radius:18px;
  border:1px solid var(--v3-line);
  background:rgba(255,255,255,.94);
  box-shadow:var(--v3-shadow);
  text-decoration:none;
}

.dash-v22-kpi:hover{
  border-color:#d5e6db;
  background:#fbfcfb;
}

.dash-v22-kpi span{
  display:block;
  margin-bottom:8px;
  color:var(--v3-muted);
  font-size:.8rem;
}

.dash-v22-kpi strong{
  display:block;
  color:var(--v3-text);
  font-size:1.15rem;
  line-height:1.1;
  letter-spacing:-.03em;
}

.dash-v22-grid{
  display:grid;
  grid-template-columns:minmax(0,2.1fr) minmax(320px,.9fr);
  gap:16px;
  margin-bottom:16px;
}

.dash-v22-panel,
.dash-v22-side-card{
  padding:20px;
  border-radius:22px;
  border:1px solid var(--v3-line);
  background:rgba(255,255,255,.94);
  box-shadow:var(--v3-shadow);
}

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

.dash-v22-panel-head h2{
  margin:8px 0 0;
  color:var(--v3-text);
  font-size:1.1rem;
  line-height:1.1;
}

.dash-v22-panel-note,
.dash-v22-panel-link{
  color:var(--v3-muted);
  font-size:.82rem;
  text-decoration:none;
}

.dash-v22-panel-link:hover{
  color:var(--v3-brand);
}

.dash-v22-bars{
  display:grid;
  gap:14px;
}

.dash-v22-bar-row{
  display:grid;
  gap:8px;
}

.dash-v22-bar-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.dash-v22-bar-meta strong{
  color:var(--v3-text);
  font-size:.95rem;
}

.dash-v22-bar-meta span{
  color:var(--v3-muted);
  font-size:.82rem;
}

.dash-v22-bar-track{
  width:100%;
  height:14px;
  border-radius:999px;
  background:#e7eeea;
  overflow:hidden;
}

.dash-v22-bar-fill{
  height:100%;
  border-radius:999px;
  background:#2f9b63;
}

.dash-v22-side{
  display:grid;
  gap:16px;
}

.dash-v22-side-card{
  display:block;
  text-decoration:none;
}

.dash-v22-side-card:hover{
  border-color:#d5e6db;
  background:#fbfcfb;
}

.dash-v22-side-card h3{
  margin:0 0 10px;
  color:var(--v3-text);
  font-size:1rem;
}

.dash-v22-side-card p{
  margin:0;
  color:var(--v3-muted);
  line-height:1.55;
}

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

.dash-v22-list-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--v3-line);
  background:#fbfcfb;
  text-decoration:none;
}

.dash-v22-list-row:hover{
  border-color:#d5e6db;
  background:#f8fbf9;
}

.dash-v22-list-row strong{
  display:block;
  color:var(--v3-text);
  font-size:.95rem;
}

.dash-v22-list-row span{
  display:block;
  color:var(--v3-muted);
  font-size:.82rem;
  line-height:1.5;
  margin-top:4px;
}

.dash-v22-list-right{
  min-width:150px;
  text-align:right;
}

.kpi-clickable-v22{
  cursor:pointer !important;
}

.kpi-clickable-v22:hover{
  border-color:#d5e6db !important;
  background:#fbfcfb !important;
}

@media (max-width:1200px){
  .dash-v22-kpis{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media (max-width:980px){
  .dash-v22-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:760px){
  .dash-v22-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .dash-v22-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .dash-v22-list-row{
    flex-direction:column;
  }

  .dash-v22-list-right{
    min-width:0;
    text-align:left;
  }
}
/* ===== END DASHBOARD / RECORD CLICKS V22 ===== */

/* ===== DASHBOARD SYNC V22B ===== */
.kpi-clickable-v22b{
  cursor:pointer !important;
}
.kpi-clickable-v22b:hover{
  border-color:#d5e6db !important;
  background:#fbfcfb !important;
}
/* ===== END DASHBOARD SYNC V22B ===== */\n\n/* ===== OWNER SCOPE / KPI CLICK V23 ===== */
.kpi-clickable-v23{
  cursor:pointer !important;
}
.kpi-clickable-v23:hover{
  border-color:#d5e6db !important;
  background:#fbfcfb !important;
}
/* ===== END OWNER SCOPE / KPI CLICK V23 ===== */\n

/* ===== HR FORM V24 ===== */
.checkbox-row-v24{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  color:var(--v3-text);
}
.checkbox-row-v24 input[type="checkbox"]{
  width:18px;
  height:18px;
}
.panel-fields-v24{
  transition:all .18s ease;
}
/* ===== END HR FORM V24 ===== */

/* ===== FIXV26 LIVESTOCK PRESENTATION ===== */
.fixv26-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:0 0 18px;
}
.fixv26-kpi-card{
  display:block;
  padding:18px 16px;
  border:1px solid #dce7e0;
  border-radius:20px;
  background:#ffffff;
  color:#1a2421;
  text-decoration:none;
  box-shadow:0 12px 28px rgba(22,34,28,.04);
}
.fixv26-kpi-card:hover{
  border-color:#cfe0d6;
  background:#fbfcfb;
}
.fixv26-kpi-card span{
  display:block;
  font-size:.82rem;
  color:#6a7871;
  margin-bottom:10px;
}
.fixv26-kpi-card strong{
  display:block;
  font-size:2rem;
  line-height:1;
  letter-spacing:-.04em;
  color:#13211d;
}

.fixv26-clean-link,
.fixv26-panel-link,
.fixv26-species-card{
  color:inherit;
  text-decoration:none;
}
.fixv26-panel-link{
  color:#6a7871;
}
.fixv26-panel-link:hover{
  color:#1f8a55;
}

.fixv26-record-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.fixv26-record-item{
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:16px;
  border:1px solid #dce7e0;
  border-radius:22px;
  background:#fff;
  color:inherit;
  text-decoration:none;
  box-shadow:0 12px 28px rgba(22,34,28,.04);
}
.fixv26-record-item:hover{
  border-color:#cfe0d6;
  background:#fbfcfb;
}
.fixv26-record-thumb-wrap{
  flex:0 0 86px;
}
.fixv26-record-thumb{
  width:86px;
  height:86px;
  border-radius:18px;
  object-fit:cover;
  display:block;
  background:#eef4ef;
}
.fixv26-record-thumb-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px;
  font-size:.82rem;
  font-weight:700;
  color:#274338;
  word-break:break-word;
}
.fixv26-record-body{
  min-width:0;
  flex:1;
}
.fixv26-record-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:6px;
}
.fixv26-record-body p{
  margin:0 0 6px;
  color:#53615b;
}
.fixv26-record-body small{
  display:block;
  color:#71807a;
  margin-bottom:10px;
}
.fixv26-open-link{
  color:#1f8a55;
  font-weight:700;
  font-size:.92rem;
}

.fixv26-list-stack{
  gap:16px;
}
.fixv26-list-card{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
}
.fixv26-list-main{
  display:flex;
  gap:16px;
  align-items:center;
  min-width:0;
  flex:1;
}
.fixv26-list-thumb-wrap{
  flex:0 0 92px;
}
.fixv26-list-thumb{
  width:92px;
  height:92px;
  border-radius:18px;
  object-fit:cover;
  display:block;
  background:#eef4ef;
}
.fixv26-list-thumb-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px;
  font-size:.82rem;
  font-weight:700;
  color:#274338;
  word-break:break-word;
}
.fixv26-list-body{
  min-width:0;
  flex:1;
}
.fixv26-list-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}
.fixv26-list-meta span{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#f4f8f5;
  border:1px solid #dce7e0;
  color:#44534d;
  font-size:.85rem;
}
@media (max-width:1100px){
  .fixv26-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .fixv26-record-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width:760px){
  .fixv26-kpi-grid{
    grid-template-columns:1fr;
  }
  .fixv26-list-card,
  .fixv26-list-main{
    flex-direction:column;
    align-items:flex-start;
  }
}
/* ===== END FIXV26 LIVESTOCK PRESENTATION ===== */

/* ===== FIXV27 SPECIES DASHBOARD ROLLBACK ===== */
.fixv27-clean-link{
  color:inherit;
  text-decoration:none;
}
.fixv27-panel-link{
  color:#6a7871;
  text-decoration:none;
}
.fixv27-panel-link:hover{
  color:#1f8a55;
}
.panel-muted{
  color:#6a7871;
  font-size:.92rem;
}
.fixv27-mix-rows{
  display:grid;
  gap:16px;
}
.fixv27-mix-row{
  display:grid;
  gap:8px;
}
.fixv27-mix-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.fixv27-mix-label strong{
  color:#1a2421;
}
.fixv27-mix-label span{
  color:#5e6c66;
  font-weight:600;
}
.fixv27-bar-track{
  width:100%;
  height:14px;
  border-radius:999px;
  background:#dfe7e2;
  overflow:hidden;
}
.fixv27-bar-fill{
  height:100%;
  border-radius:999px;
}
.fixv27-bar-green{ background:#2ca260; }
.fixv27-bar-blue{ background:#4286cf; }
.fixv27-bar-orange{ background:#db8d3c; }

.fixv27-due-date{
  color:#238854;
}

.fixv27-animal-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.fixv27-animal-card{
  display:block;
  padding:18px;
  border:1px solid #dce7e0;
  border-radius:22px;
  background:#fff;
  color:inherit;
  text-decoration:none;
  box-shadow:0 12px 28px rgba(22,34,28,.04);
}
.fixv27-animal-card:hover{
  border-color:#cfe0d6;
  background:#fbfcfb;
}
.fixv27-animal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.fixv27-tag{
  color:#1f8a55;
  font-weight:700;
  font-size:.92rem;
}
.fixv27-animal-meta{
  display:grid;
  gap:6px;
  color:#5f6d67;
}

.fixv27-side-stack{
  display:grid;
  gap:18px;
}

@media (max-width:980px){
  .fixv27-animal-grid{
    grid-template-columns:1fr;
  }
}
/* ===== END FIXV27 SPECIES DASHBOARD ROLLBACK ===== */

/* ===== MF V28 COMPACT LIVESTOCK UI ===== */
.mf-v28-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.mf-v28-head-copy{
  max-width:860px;
}

.mf-v28-head h1{
  margin:8px 0 10px;
  font-size:2.45rem;
  line-height:1.02;
  letter-spacing:-.06em;
}

.mf-v28-head p{
  margin:0;
  color:#66756f;
  max-width:820px;
  font-size:1rem;
  line-height:1.55;
}

.mf-v28-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.mf-v28-chip{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid #d9e5de;
  background:#f7faf8;
  color:#355247;
  font-size:.82rem;
  font-weight:700;
}

.mf-v28-category-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.mf-v28-category-card{
  padding:20px 20px 18px;
  border-radius:24px;
  border:1px solid #dbe6df;
  background:rgba(255,255,255,.94);
  box-shadow:0 14px 34px rgba(18,32,26,.05);
}

.mf-v28-card-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.mf-v28-card-label{
  display:block;
  margin-bottom:6px;
  color:#23915a;
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.mf-v28-category-card h3{
  margin:0;
  font-size:1.35rem;
  line-height:1.05;
  letter-spacing:-.04em;
  color:#15211d;
}

.mf-v28-card-copy{
  margin:0 0 14px;
  color:#64736d;
  line-height:1.55;
  min-height:72px;
}

.mf-v28-card-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:14px;
}

.mf-v28-card-tags span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid #dbe6df;
  background:#f7faf8;
  color:#455650;
  font-size:.8rem;
  font-weight:700;
}

.mf-v28-card-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}

.mf-v28-card-link{
  color:#1d8a56;
  font-weight:800;
  text-decoration:none;
  font-size:1rem;
}

.mf-v28-card-mini{
  color:#5f6f68;
  text-decoration:none;
  font-size:.9rem;
  font-weight:700;
}

.mf-v28-card-link:hover,
.mf-v28-card-mini:hover{
  color:#145e3b;
}

.mf-v28-mini-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

.mf-v28-mini-kpi{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid #dbe6df;
  background:#fff;
  box-shadow:0 10px 24px rgba(18,32,26,.04);
}

.mf-v28-mini-kpi span{
  display:block;
  margin-bottom:8px;
  color:#6b7a74;
  font-size:.8rem;
}

.mf-v28-mini-kpi strong{
  display:block;
  color:#15211d;
  font-size:1.6rem;
  line-height:1;
  letter-spacing:-.05em;
}

.mf-v28-record-stack{
  gap:14px;
}

.mf-v28-record-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:16px 18px;
  border-radius:24px;
}

.mf-v28-record-main{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
  flex:1;
}

.mf-v28-record-thumb-wrap{
  flex:0 0 84px;
}

.mf-v28-record-thumb{
  width:84px;
  height:84px;
  border-radius:18px;
  object-fit:cover;
  display:block;
  background:#edf4ef;
}

.mf-v28-record-thumb-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px;
  color:#28483c;
  font-size:.82rem;
  font-weight:800;
  word-break:break-word;
}

.mf-v28-record-body{
  min-width:0;
  flex:1;
}

.mf-v28-record-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.mf-v28-record-head strong{
  display:block;
  font-size:1.18rem;
  line-height:1.08;
  color:#15211d;
  margin-bottom:4px;
}

.mf-v28-record-head p{
  margin:0;
  color:#60706a;
}

.mf-v28-inline-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.mf-v28-inline-meta span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid #dbe6df;
  background:#f7faf8;
  color:#4c5d57;
  font-size:.8rem;
  font-weight:700;
}

.mf-v28-record-actions{
  flex:0 0 auto;
  align-self:center;
}

.metric-card a,
.fixv26-kpi-card a,
.fixv27-clean-link,
.fixv27-clean-link *,
.metric-card,
.metric-card *,
.fixv26-kpi-card,
.fixv26-kpi-card *{
  text-decoration:none !important;
}

@media (max-width:1080px){
  .mf-v28-category-grid{
    grid-template-columns:1fr;
  }

  .mf-v28-mini-kpis{
    grid-template-columns:1fr;
  }

  .mf-v28-record-card{
    flex-direction:column;
    align-items:flex-start;
  }
}

@media (max-width:860px){
  .mf-v28-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .mf-v28-record-main{
    flex-direction:column;
    align-items:flex-start;
  }

  .mf-v28-record-thumb-wrap{
    flex-basis:auto;
  }
}
/* ===== END MF V28 COMPACT LIVESTOCK UI ===== */

/* ===== MF V29 SAFE UI RESTORE PATCH ===== */
.metric-card a,
.metric-card a:visited,
.fixv27-clean-link,
.fixv27-clean-link:visited,
.fixv26-kpi-card a,
.fixv26-kpi-card a:visited,
.mf-v28-card-link,
.mf-v28-card-link:visited,
.mf-v28-card-mini,
.mf-v28-card-mini:visited{
  color:inherit !important;
  text-decoration:none !important;
}

.record-card .ear-tag-badge,
.recent-thumb-wrap .ear-tag-badge{
  display:inline-flex !important;
}

.page-copy{
  color:#66756f;
}

.hero-panel h1,
.page-head h1{
  letter-spacing:-.05em;
}
/* ===== END MF V29 SAFE UI RESTORE PATCH ===== */

/* ===== V31 FOCUSED UI PATCH ===== */
.click-card{
  position:relative;
  transition:transform .18s ease, box-shadow .18s ease;
}
.click-card:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 34px rgba(14,35,27,.08);
}
.record-stretch-link{
  position:absolute;
  inset:0;
  z-index:1;
}
.click-card .record-actions,
.click-card .record-actions *{
  position:relative;
  z-index:3;
}
.click-card .record-main{
  position:relative;
  z-index:2;
}
.v31-thumb-wrap{
  position:relative;
}
.v31-thumb-wrap .ear-tag-badge{
  position:absolute;
  top:8px;
  left:8px;
  z-index:4;
}
.record-title-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:8px;
}
.record-title-row h3{
  margin:0 0 4px;
  font-size:1.35rem;
  line-height:1.05;
}
.record-title-row p{
  margin:0;
  color:#63726c;
}
.record-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.record-chip-row span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid #dbe6df;
  background:#f5faf7;
  color:#50615a;
  font-size:.84rem;
  font-weight:700;
}
.compact-kpis .kpi-card span{
  display:block;
  color:#6d7a75;
  margin-bottom:6px;
}
.compact-kpis .kpi-card strong{
  font-size:2rem;
  line-height:1;
  letter-spacing:-.05em;
}
.soft-card{
  border:1px solid #dbe6df;
  border-radius:22px;
  padding:18px;
  background:#fbfdfc;
}
.soft-card h3{
  margin:0 0 10px;
}
.soft-list{
  margin:0;
  padding-left:18px;
}
.soft-list li{
  margin:0 0 6px;
}
.metric-card a,
.metric-card a:visited{
  color:inherit !important;
  text-decoration:none !important;
}
/* ===== END V31 FOCUSED UI PATCH ===== */

/* ===== Sign in v2 ===== */
.signin-v2-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:1.05fr 0.95fr;
  gap:28px;
  align-items:center;
  padding:40px;
  background:
    radial-gradient(circle at top left, rgba(36,153,95,.12), transparent 28%),
    linear-gradient(180deg,#edf4ef 0%, #eef2ef 100%);
}

.signin-v2-side{
  padding:28px;
}

.signin-v2-chip{
  display:inline-flex;
  padding:8px 14px;
  border-radius:999px;
  background:#dff1e6;
  color:#1b7b49;
  font-size:13px;
  font-weight:700;
  margin-bottom:18px;
}

.signin-v2-side h1{
  margin:0 0 14px;
  font-size:54px;
  line-height:1.02;
  color:#14231b;
}

.signin-v2-copy{
  max-width:620px;
  color:#5f7067;
  font-size:20px;
  line-height:1.65;
  margin:0 0 24px;
}

.signin-v2-points{
  display:grid;
  gap:14px;
  max-width:620px;
}

.signin-v2-point{
  background:rgba(255,255,255,.72);
  border:1px solid #d7e2da;
  border-radius:20px;
  padding:16px 18px;
  box-shadow:0 12px 35px rgba(17,44,31,.05);
}

.signin-v2-point strong{
  display:block;
  font-size:16px;
  color:#163323;
  margin-bottom:4px;
}

.signin-v2-point span{
  color:#62736a;
  font-size:14px;
  line-height:1.5;
}

.signin-v2-card{
  max-width:520px;
  width:100%;
  margin-left:auto;
  background:rgba(255,255,255,.82);
  border:1px solid #d7e2da;
  border-radius:28px;
  padding:34px;
  box-shadow:0 24px 70px rgba(12,33,23,.10);
  backdrop-filter:blur(10px);
}

.signin-v2-badge{
  display:inline-flex;
  padding:7px 12px;
  border-radius:999px;
  background:#ecf6ef;
  color:#1b7b49;
  font-size:12px;
  font-weight:700;
  margin-bottom:14px;
}

.signin-v2-card h2{
  margin:0 0 8px;
  font-size:38px;
  color:#15231b;
}

.signin-v2-sub{
  margin:0 0 22px;
  color:#607168;
  font-size:15px;
}

.signin-v2-form{
  display:grid;
  gap:16px;
}

.signin-v2-field{
  display:grid;
  gap:8px;
}

.signin-v2-field label{
  font-size:14px;
  font-weight:700;
  color:#183225;
}

.signin-v2-field input{
  height:54px;
  border-radius:16px;
  border:1px solid #cfddd3;
  background:#f9fbf9;
  padding:0 16px;
  font-size:15px;
  outline:none;
}

.signin-v2-field input:focus{
  border-color:#29985f;
  box-shadow:0 0 0 4px rgba(41,152,95,.12);
  background:#fff;
}

.signin-v2-submit{
  margin-top:8px;
  height:54px;
  border:none;
  border-radius:16px;
  background:linear-gradient(135deg,#1d9b56 0%, #148246 100%);
  color:#fff;
  font-size:16px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 18px 40px rgba(28,140,80,.22);
}

@media (max-width: 980px){
  .signin-v2-shell{
    grid-template-columns:1fr;
    padding:22px;
  }
  .signin-v2-side{
    padding:8px 2px;
  }
  .signin-v2-side h1{
    font-size:38px;
  }
  .signin-v2-copy{
    font-size:17px;
  }
  .signin-v2-card{
    margin:0;
    max-width:none;
  }
}
