: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;
}
