/* ===== ReGrow App CSS (clean + updated) ===== */

/* (Optional) nicer dashboard title font */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;600;700;800&display=swap');

:root{
  --forest:#2F5D50;
  --leaf:#6FAF8E;
  --sand:#E8DCC4;
  --soft:#FAFAF7;
  --ink:#0F1F1B;
  --muted:#3A3A3A;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:#f3f5f1;
  color:var(--forest);
}

.app-body{ min-height:100vh; }

/* ===== Login shell ===== */
.app-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px 18px;
  background: linear-gradient(180deg, rgba(198,237,217,0.9), var(--soft));
}

.app-card{
  width:100%;
  max-width:520px;
  background:rgba(255,255,255,0.92);
  border:1px solid rgba(47,93,80,0.12);
  border-radius:22px;
  padding:38px 34px;
  box-shadow:0 24px 70px rgba(0,0,0,0.10);
}

.back-home {
  display: block;
  text-align: center;
  margin: -8px 0 22px;
  text-decoration: none;
  color: #2F5D50;
  font-weight: 700;
  font-size: 14px;
}

.back-home:hover {
  opacity: 0.75;
}



.app-title{
  margin:0 0 10px 0;
  font-size:32px;
}

.app-subtitle{
  margin:0 0 24px 0;
  color:var(--muted);
}

/* ===== Form UI ===== */
.form{display:flex;flex-direction:column;gap:12px}
.label{font-size:13px;color:#284c43;font-weight:600}

.input{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(47,93,80,0.18);
  background:rgba(250,250,247,0.9);
  outline:none;
}
.input:focus{
  border-color:rgba(111,175,142,0.9);
  box-shadow:0 0 0 4px rgba(111,175,142,0.18);
}

.btn{
  padding:12px 14px;
  border-radius:12px;
  border:none;
  background:var(--forest);
  color:var(--soft);
  font-weight:700;
  cursor:pointer;
}
.btn:hover{filter:brightness(1.05)}

.btn-outline{
  padding:10px 12px;
  border-radius:12px;
  background: rgba(47, 93, 80, 0.06);
  color: #2f5d50;
  border: 1.5px solid rgba(47, 93, 80, 0.35);
  font-weight: 600;
  cursor:pointer;
  opacity:1;
}
.btn-outline:hover{
  background: rgba(47, 93, 80, 0.12);
  border-color: rgba(47, 93, 80, 0.55);
  transform: translateY(-1px);
}
.btn-outline:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

.tiny-note{font-size:12px;color:#44655c;opacity:0.95;margin-top:6px}
.tiny{font-size:12px;color:rgba(255,255,255,0.85)}
.muted{ color:#4b6b61; font-size:13px; }

/* ===== Topbar (less stocky + more aesthetic) ===== */
.app-topbar{
  position:sticky;
  top:0;
  z-index:50;

  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;

  padding:10px 28px; /* slimmer */
  background: linear-gradient(135deg, #2F5D50 0%, #2E5A4F 45%, #2A5147 100%);
  border-bottom:1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
}

/* subtle shine line */
.app-topbar::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:-1px;
  height:1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  pointer-events:none;
}

/* Left side */
.topbar-left{
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
}

/* Brand */
.app-brand{
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1;
  display:inline-flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
  color: rgba(255,255,255,0.95);
}
/* ===== Login page logo ===== */
.app-card .app-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  height: 120px;
  overflow: hidden;

  /* removes old text-brand styling on login card */
  font-family: inherit;
  font-size: initial;
  font-weight: initial;
  color: initial;
}

.app-card .app-brand img {
  width: 280px;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Center title */
.topbar-center{
  text-align:center;
  font-family: "DM Serif Display", Georgia, "Times New Roman", serif;
  font-size:18px;
  font-weight:400;
  letter-spacing:0.45px;
  line-height:1;
  color: rgba(255,255,255,0.95);
}

/* Right side */
.topbar-right{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Make topbar buttons blend in */
.app-topbar .btn{
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,255,255,0.16);
}
.app-topbar .btn:hover{
  background: rgba(255,255,255,0.18);
}

.app-topbar .btn-outline{
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.18);
}
.app-topbar .btn-outline:hover{
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

/* ===== Main layout ===== */
.app-main{
  padding:26px 22px 60px;
  max-width:1200px;
  margin:0 auto;
}

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

.stat{
  background:rgba(255,255,255,0.95);
  border:1px solid rgba(47,93,80,0.10);
  border-radius:16px;
  padding:16px 16px;
  box-shadow:0 14px 40px rgba(0,0,0,0.06);
}
.stat-label{font-size:12px;color:#51746a;font-weight:700;letter-spacing:0.3px}
.stat-value{font-size:26px;font-weight:800;margin-top:6px;color:var(--forest)}

.grid{
  display:grid;
  grid-template-columns:1.05fr 1.35fr;
  gap:18px;
}

.panel{
  background:rgba(255,255,255,0.95);
  border:1px solid rgba(47,93,80,0.10);
  border-radius:18px;
  padding:18px 18px 16px;
  box-shadow:0 14px 40px rgba(0,0,0,0.06);
}

.panel-title{margin:0 0 6px 0;font-size:20px}
.panel-subtitle{margin:0 0 14px 0;color:#4b6b61;font-size:13px}

.grid-form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.field{display:flex;flex-direction:column;gap:6px}
.field-wide{grid-column:1 / -1}

/* ===== Table ===== */
.table-wrap{
  overflow:auto;
  border-radius:14px;
  border:1px solid rgba(47,93,80,0.10);
}
.table{
  width:100%;
  border-collapse:collapse;
  min-width:840px;
  background:rgba(250,250,247,0.65);
}
th,td{
  padding:12px 10px;
  border-bottom:1px solid rgba(47,93,80,0.08);
  text-align:left;
  font-size:13px;
}
th{
  background:rgba(232,220,196,0.35);
  font-weight:800;
  color:#27473f;
}

/* ===== Logs UI ===== */
.logs-list{ display:flex; flex-direction:column; gap:10px; }

.log-card{
  border:1px solid rgba(47,93,80,0.10);
  background:rgba(250,250,247,0.75);
  border-radius:14px;
  padding:12px 12px;
}
.log-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:8px 12px;
  margin-top:8px;
  font-size:13px;
}
.log-notes{
  margin-top:8px;
  font-size:13px;
  color:#355F53;
}

/* Bring "View Logs" slightly closer to Submit Entry */
#viewLogsBtn{
  margin-top: -10px;
}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .stats-row{grid-template-columns:repeat(2,1fr)}
  .grid{grid-template-columns:1fr}
  .btn-outline{display:none}
}

/* ===== Dashboard Topbar - clean green navbar ===== */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;

  height: 64px;
  padding: 0 28px;

  display: grid;
  grid-template-columns: 220px 1fr 220px;
  align-items: center;

  background: linear-gradient(135deg, #2F5D50 0%, #2E5A4F 45%, #2A5147 100%);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 30px rgba(0,0,0,0.10);
}

/* subtle shine line */
.app-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  pointer-events: none;
}

/* Left logo area */
.topbar-left {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Logo wrapper */
.app-topbar .app-brand {
  width: 150px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  overflow: hidden;

  font-family: inherit;
  font-size: initial;
  font-weight: initial;
  color: initial;
  line-height: 1;
  gap: 0;
}

/* Logo image */
.app-topbar .app-brand img {
  height: 150px;
  width: auto;
  display: block;
  object-fit: contain;
  transform: translateY(-2px);
}

/* Center title */
.topbar-center {
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1;
  color: rgba(255,255,255,0.96);
}

/* Right button area */
.topbar-right {
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Topbar buttons */
.app-topbar .btn,
.app-topbar .btn-outline {
  padding: 9px 15px;
  border-radius: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* Refresh button */
.app-topbar .btn-outline {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.94);
  border: 1px solid rgba(255,255,255,0.22);
}

/* Log out button */
.app-topbar .btn {
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.18);
}

.app-topbar .btn:hover,
.app-topbar .btn-outline:hover {
  background: rgba(255,255,255,0.18);
  transform: none;
}

.app-card .app-title {
  text-align: center !important;
  width: 100%;
}