:root{
  --bg:#fffdf6;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e5e7eb;
  --yellow:#f6c343;
  --yellow2:#ffdd75;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 16px;
  --radius2: 22px;
  --danger:#b91c1c;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:var(--bg);
  color:var(--text);
}
a{ color:inherit; text-decoration:none; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.app{ display:flex; min-height:100vh; }
.sidebar{
  width:290px;
  background: linear-gradient(180deg, #fff, #fff7db);
  border-right:1px solid var(--border);
  padding:18px 14px;
}
.brand{
  background: linear-gradient(180deg, var(--yellow2), #fff);
  border:1px solid var(--border);
  border-radius: var(--radius2);
  padding:14px;
  box-shadow: var(--shadow);
  margin-bottom:14px;
}
.brand-title{ font-weight:900; letter-spacing:.2px; font-size:16px; line-height:1.2; }
.brand-sub{ font-size:12px; color:var(--muted); margin-top:4px; }

.menu{ display:flex; flex-direction:column; gap:10px; }
.menu .area{
  border:1px solid var(--border);
  background:#fff;
  border-radius: var(--radius);
  overflow:hidden;
}
.area-h{
  padding:10px 12px;
  font-weight:900;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background: linear-gradient(180deg, #fff, #fff9e6);
}
.area-b{ padding:8px 8px 10px; display:flex; flex-direction:column; gap:6px; }
.link{
  padding:10px 10px;
  border-radius: 12px;
  border:1px solid transparent;
  background:#fff;
}
.link:hover{ border-color: var(--border); background:#fffdf1; }
.link.active{ border-color: var(--yellow); background:#fff3c2; }

.main{ flex:1; display:flex; flex-direction:column; }
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 18px;
  border-bottom:1px solid var(--border);
  background:#fff;
}
.page-title{ font-weight:900; font-size:18px; }
.page-hash{ color:var(--muted); font-size:12px; margin-top:2px; }
.content{ padding:18px; }

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding:16px;
}

.grid{ display:grid; grid-template-columns: repeat(12, 1fr); gap:14px; }
.col-6{ grid-column: span 6; }
.col-12{ grid-column: span 12; }

.btn{
  border:1px solid var(--border);
  background:#fff;
  border-radius: 14px;
  padding:10px 12px;
  font-weight:900;
  cursor:pointer;
}
.btn.primary{
  background: linear-gradient(180deg, var(--yellow2), var(--yellow));
  border-color: #e7c14a;
}
.btn.ghost{ background:#fff; }
.btn:active{ transform: translateY(1px); }

.input{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  outline:none;
}
.input:focus{ border-color: #e7c14a; box-shadow: 0 0 0 4px rgba(246,195,67,.22); }

.muted{ color:var(--muted); font-size:13px; }
.small{ font-size:12px; color:var(--muted); }
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius: 999px;
  background:#fff;
  font-size:12px;
  color:var(--muted);
}

.toast{
  position:fixed;
  bottom:18px; right:18px;
  background:#111827;
  color:#fff;
  padding:12px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

/* ===== AUTH MODE ===== */
.auth-mode .sidebar, .auth-mode .topbar{ display:none; }
.auth-mode .main{ width:100%; }

.auth-wrap{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(1200px 500px at 20% 10%, rgba(246,195,67,.20), transparent 60%),
    radial-gradient(900px 450px at 80% 20%, rgba(255,221,117,.22), transparent 60%),
    linear-gradient(180deg, #fff, #fffdf6);
}

.login-card{
  width: 520px;
  max-width: calc(100vw - 32px);
  padding: 18px;
}

.login-head{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom: 14px;
}

.login-logo{
  width: 120px;
  height: 64px;
  object-fit: contain;
  display:block;
  background:#fff;
  border:1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
}

.login-title{
  font-weight: 950;
  font-size: 18px;
  line-height: 1.2;
}

.login-sub{
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.login-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 12px;
  margin: 10px 0 14px;
}

.hero-left{
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.hero-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.agro-icon{
  width: 34px;
  height: 34px;
  border:1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fff9e6);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 8px 18px rgba(0,0,0,.06);
}

.form-grid{ display:grid; gap:10px; }

.error-text{
  color: var(--danger);
  font-size: 12px;
  min-height: 16px;
}

.zernyx-credit{
  position: fixed;
  right: 14px;
  bottom: 12px;
  font-size: 11px;
  color: rgba(107,114,128,.85);
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(229,231,235,.8);
  border-radius: 999px;
  padding: 6px 10px;
  backdrop-filter: blur(6px);
}
