/* public/styles.css */
/* AgroNexus TerraTech - UI padrão (dark premium) */

:root{
  --bg0:#061021;
  --bg1:#07162a;
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.08);
  --stroke:rgba(255,255,255,.10);
  --stroke2:rgba(255,255,255,.14);

  --text:#eaf2ff;
  --muted:rgba(234,242,255,.72);

  --brand:#2dd4bf;     /* teal */
  --brand2:#60a5fa;    /* blue */
  --good:#22c55e;
  --warn:#fbbf24;
  --bad:#ef4444;

  --shadow: 0 24px 60px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(45,212,191,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(96,165,250,.16), transparent 55%),
    radial-gradient(1000px 600px at 30% 90%, rgba(16,185,129,.10), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
}

/* links */
a{ color:inherit; }
a:hover{ opacity:.95; }
a:active{ opacity:.9; }
a, button{ -webkit-tap-highlight-color: transparent; }

/* layout containers */
.wrap{
  max-width: 980px;
  margin: 28px auto;
  padding: 0 18px 40px;
}

/* top header */
.top{
  position: sticky;
  top:0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(5,12,22,.82), rgba(5,12,22,.52));
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.top .brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  width:44px;
  height:44px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  font-weight:800;
  letter-spacing:.5px;
  background: linear-gradient(135deg, rgba(45,212,191,.35), rgba(96,165,250,.30));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

.name{ font-weight:800; }
.sub{ font-size:12px; color:var(--muted); margin-top:2px; }

header.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 18px;
}

/* actions right */
.actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.wallet{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding: 10px 14px;
  min-width: 130px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
.wl{ font-size:12px; color:var(--muted); }
.wv{ font-size:16px; font-weight:800; margin-top:2px; }

/* buttons */
button, .btn, .btnPrimary, .btnSecondary{
  border:0;
  cursor:pointer;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight:700;
  font-size: 14px;
  transition: transform .08s ease, opacity .12s ease, background .15s ease, border-color .15s ease;
}

button:active, .btn:active, .btnPrimary:active, .btnSecondary:active{
  transform: translateY(1px);
}

.btnPrimary{
  color:#061021;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 10px 24px rgba(0,0,0,.30);
}
.btnPrimary:hover{ opacity:.96; }

.btnSecondary{
  color:var(--text);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.btnSecondary:hover{ background: rgba(255,255,255,.08); }

/* cards */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

h1, h2, h3{ margin:0 0 10px; letter-spacing: .2px; }
h1{ font-size: 34px; }
p{ margin: 0; }
.muted{ color: var(--muted); }

/* dashboard grid tiles */
.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.tile{
  display:block;
  text-decoration:none;
  padding: 16px 16px;
  border-radius: var(--radius2);
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
  transition: transform .10s ease, background .15s ease, border-color .15s ease;
}
.tile:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
}
.tileTitle{
  font-weight: 800;
  font-size: 16px;
}
.tileText{
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
  line-height: 1.25;
}

/* mobile */
@media (max-width: 760px){
  header.top{ padding: 12px 14px; }
  .wrap{ margin-top: 18px; }
  .grid{ grid-template-columns: 1fr; }
  h1{ font-size: 28px; }
}

/* forms (login) */
.formCard{
  max-width: 520px;
  margin: 26px auto;
}

label{
  display:block;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 6px;
}

input, textarea, select{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline: none;
}
input:focus, textarea:focus, select:focus{
  border-color: rgba(96,165,250,.55);
  box-shadow: 0 0 0 4px rgba(96,165,250,.12);
}

.hr{
  height:1px;
  background: rgba(255,255,255,.08);
  margin: 16px 0;
}

/* alerts */
.alert{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.alert.error{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}
.alert.ok{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.10);
}

/* PIX / Wallet common helpers */
.row{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}

.dot{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:999px;
  background: var(--warn);
  box-shadow: 0 0 0 6px rgba(251,191,36,.12);
}

/* Wallet ledger */
.ledgerRow{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ledgerLeft{ display:flex; flex-direction:column; gap:4px; }
.ledgerType{ font-weight: 800; }
.ledgerMeta{ font-size: 12px; color: var(--muted); }
.ledgerRight{ font-weight: 900; }
.ledgerRight.pos{ color: var(--good); }
.ledgerRight.neg{ color: var(--bad); }

/* tables (if you add later) */
table{
  width:100%;
  border-collapse: collapse;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
}
th, td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align:left;
}
th{ color: var(--muted); font-weight:700; background: rgba(255,255,255,.04); }

/* small helpers */
.spacer8{ height:8px; }
.spacer12{ height:12px; }
.spacer16{ height:16px; }
.center{ display:grid; place-items:center; }
.hidden{ display:none !important; }