/* ══════════════════════════════════════════════════════════════════════════
   BASE.CSS — Shared Design Tokens, Reset & Common Components
   ══════════════════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  --green:        #97D131;
  --green-dark:   #6fa81e;
  --green-deep:   #3d6b08;
  --green-light:  #f2fae4;
  --green-mid:    #d6f0a0;
  --green-border: #b8e06a;

  --blue:         #3b82c4;
  --blue-light:   #eef5fc;
  --blue-mid:     #bcd9f1;
  --blue-dark:    #1e5a9a;

  --red:          #dc3545;
  --red-light:    #fdf2f2;
  --red-dark:     #b02a37;

  --white:        #ffffff;
  --surface:      #f5f7f3;
  --border:       #dde8d0;
  --text:         #1a2210;
  --text-mid:     #4a5c38;
  --text-muted:   #7a8f6a;

  --radius-card:  16px;
  --radius-in:    10px;
  --input-h:      50px;
  --shadow-card:  0 2px 16px rgba(60,110,8,0.07), 0 1px 4px rgba(60,110,8,0.04);
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Telegraf', 'DM Sans', 'Inter', system-ui, sans-serif;
  background: var(--surface);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── SUBTLE GRID BACKGROUND ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(151,209,49,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151,209,49,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── COMMON FORM ELEMENTS ── */
label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 6px;
}

.req {
  color: var(--green-dark);
  margin-left: 2px;
}

.opt {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 5px;
  vertical-align: middle;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="password"],
select,
textarea {
  width: 100%;
  height: var(--input-h);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-in);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  height: auto;
  min-height: 80px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: #aab89a;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: 0 0 0 3px rgba(151,209,49,0.18);
}

input.err,
select.err,
textarea.err {
  border-color: #e05555;
  background: #fff6f6;
  box-shadow: 0 0 0 3px rgba(224,85,85,0.1);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236fa81e' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: saturate(0.6) sepia(0.4) hue-rotate(60deg);
}

/* ── COMMON LOGO COMPONENT ── */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-box {
  width: 36px;
  height: 36px;
  background: var(--green-light);
  border: 2px solid var(--green);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-box svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--green-dark);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.logo-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-name em {
  color: var(--green-dark);
  font-style: normal;
}

/* ── COMMON BADGES ── */
.secure-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--blue-dark);
  background: var(--blue-light);
  border: 2px solid var(--blue-mid);
  border-radius: 100px;
  padding: 5px 12px 5px 9px;
}

.secure-badge svg {
  width: 13px;
  height: 13px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* ── COMMON ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}