/* The daily record — product interface
   ---------------------------------------------------------------------------
   Its own stylesheet, not the shopfront's. This is software sold to a farm; the
   storefront is one farm's brand. Mixing them is why the app looked borrowed.

   Everything here is derived from where it is actually used: a cheap Android,
   held in one hand, outdoors in strong Konkan daylight, at the end of a working
   day — and often after dark, because the day is written up once it is over.
   That gives a light theme with real contrast rather than a fashionable dim
   one, thumb-sized targets, and a dark theme that is designed rather than
   inverted.
   --------------------------------------------------------------------------- */

:root {
  --bg:      #f1f4f2;   /* page ground — cool paper, deliberately not the shopfront's cream */
  --surface: #ffffff;   /* cards, the sheet you write on */
  --raised:  #f7f9f7;   /* inputs and inset rows */
  --ink:     #0f1613;   /* body text */
  --soft:    #5a6661;   /* labels, secondary, units */
  --line:    #dbe2dd;   /* hairlines */
  --line-2:  #c3cec8;   /* stronger divisions */
  --brand:   #146b45;   /* THE accent: paddy green. Links, focus, primary, done */
  --brand-2: #0f5335;   /* pressed */
  --brand-w: #e6f1eb;   /* brand wash */
  --warn:    #b4551c;   /* one job: does not tie, missing, needs attention */
  --warn-w:  #fbeee5;
  --shadow:  0 1px 2px rgba(15,22,19,.06), 0 8px 24px -12px rgba(15,22,19,.18);

  --ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --num: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #0d120f;
    --surface: #151c18;
    --raised:  #1b231e;
    --ink:     #e9efea;
    --soft:    #93a099;
    --line:    #232c27;
    --line-2:  #33403a;
    --brand:   #4bb684;
    --brand-2: #6bcb9c;
    --brand-w: #14261d;
    --warn:    #e08a4f;
    --warn-w:  #2a1a10;
    --shadow:  0 1px 2px rgba(0,0,0,.5), 0 10px 30px -14px rgba(0,0,0,.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--ui);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums lining-nums;
}
a { color: var(--brand); text-underline-offset: .16em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.shell { max-width: 34rem; margin: 0 auto; padding: 0 1rem 4.5rem; }

/* ---------------------------------------------------------------- top bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1.3rem;
}
.bar-id { display: flex; align-items: center; gap: .55rem; text-decoration: none;
  color: inherit; }
.bar-id svg { width: 26px; height: 26px; display: block; }
.bar-id b { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; }
.bar-id i { display: block; font-style: normal; font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--soft); }
.bar-act { display: flex; align-items: center; gap: .6rem; font-size: .82rem;
  color: var(--soft); }

/* ------------------------------------------------------------------ login */
.auth-wrap { min-height: 100svh; display: grid; place-items: center; padding: 1.2rem;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--brand-w) 0%, transparent 60%),
    var(--bg); }
.auth { width: 100%; max-width: 23rem; }
.auth-mark { display: flex; flex-direction: column; align-items: center;
  gap: .7rem; margin-bottom: 1.5rem; text-align: center; }
.auth-mark svg { width: 46px; height: 46px; }
.auth-mark b { font-size: 1.32rem; font-weight: 600; letter-spacing: -.025em;
  line-height: 1.1; }
.auth-mark span { font-size: .78rem; color: var(--soft); letter-spacing: .04em; }
.card { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 1.35rem 1.25rem 1.4rem; }
.card h1 { font-size: 1.12rem; font-weight: 600; margin: 0 0 .2rem; letter-spacing: -.015em; }
.card .hint { margin: 0 0 1.15rem; font-size: .88rem; color: var(--soft); }
.auth-foot { text-align: center; margin: 1.1rem 0 0; font-size: .76rem; color: var(--soft); }
.auth-foot a { color: var(--soft); }

/* ------------------------------------------------------------------ forms */
.f { margin-bottom: .95rem; }
.f > label { display: block; font-size: .76rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--soft); margin-bottom: .35rem; }
input[type=text], input[type=tel], input[type=password], input[type=number], textarea, select {
  font: inherit; font-variant-numeric: tabular-nums; width: 100%;
  background: var(--raised); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: .68rem .75rem; min-height: 2.85rem; -webkit-appearance: none; appearance: none;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
input::placeholder { color: var(--soft); opacity: .7; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
select { background-image:
  linear-gradient(45deg, transparent 50%, currentColor 50%),
  linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 1.05rem center, right .78rem center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2.1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; letter-spacing: .005em; cursor: pointer;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  border-radius: 8px; padding: .78rem 1.15rem; min-height: 2.95rem;
  text-decoration: none; transition: transform .1s cubic-bezier(.2,.8,.3,1),
    background .14s ease, box-shadow .14s ease;
  box-shadow: 0 1px 2px rgba(15,22,19,.14);
}
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.wide { width: 100%; }
.btn.quiet { background: transparent; color: var(--brand); border-color: var(--line-2);
  box-shadow: none; }
.btn.quiet:hover { background: var(--brand-w); border-color: var(--brand); color: var(--brand); }
.btn.small { padding: .35rem .7rem; min-height: 0; font-size: .78rem; border-radius: 6px; }

.alert { border-radius: 8px; padding: .7rem .85rem; font-size: .89rem;
  margin: 0 0 1rem; border: 1px solid transparent; }
.alert.bad { background: var(--warn-w); border-color: color-mix(in srgb, var(--warn) 35%, transparent);
  color: var(--warn); }
.alert.good { background: var(--brand-w); border-color: color-mix(in srgb, var(--brand) 30%, transparent);
  color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
