/* ══════════════════════════════════════════════════════════════
   Tendery Employee Portal — warm, trustworthy, premium
   Soft paper background, confident greens & golds, big numbers.
   All class hooks preserved.
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg: #faf6ee;
  --card: #fffdf9;
  --ink: #26211a;
  --ink-soft: #6f6659;
  --ink-faint: #a39a8a;
  --line: #eadfc9;
  --line-soft: #f2ead9;
  --accent: #177a5c;        /* deep trustworthy green */
  --accent-deep: #0f5c43;
  --accent-soft: #e3f1e9;
  --accent-glow: rgba(23, 122, 92, 0.28);
  --gold: #c98a1b;
  --gold-deep: #a06d10;
  --gold-soft: #fdf3df;
  --warn-bg: #fdf0e2;
  --warn-ink: #9a5b13;
  --danger: #b4432f;
  --danger-soft: #fbe9e4;
  --radius: 18px;
  --shadow: 0 2px 6px rgba(80, 60, 30, 0.05), 0 14px 34px rgba(80, 60, 30, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1000px 420px at 50% -8%, rgba(201, 138, 27, 0.08), transparent 65%),
    radial-gradient(800px 500px at 105% 40%, rgba(23, 122, 92, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(23, 122, 92, 0.22); }

h1, h2, h3 { margin: 0 0 8px; letter-spacing: -0.025em; font-weight: 750; }
h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.22rem; }

.view[hidden] { display: none; }
.view:not([hidden]) { animation: viewIn 0.4s cubic-bezier(0.2, 0.7, 0.3, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  font: inherit;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 22px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.08s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.btn-primary {
  background: linear-gradient(135deg, #1d8a67, var(--accent-deep));
  color: #fff;
  box-shadow: 0 6px 18px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 8px 24px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.22); }

.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: #cbe2d5;
}
.btn-secondary:hover { background: #d7ecdf; }

.btn-lg { font-size: 1.12rem; padding: 16px 38px; border-radius: 14px; }
.btn-block { width: 100%; margin-top: 18px; font-size: 1.05rem; }

.btn-chip {
  background: var(--gold-soft);
  color: #7a5510;
  border: 1px solid #f0dcb4;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(160, 109, 16, 0.1);
}
.btn-chip:hover:not(:disabled) { background: #faecd2; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(160, 109, 16, 0.16); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding: 9px 13px;
}
.btn-ghost:hover { background: rgba(0, 0, 0, 0.05); color: var(--ink); }

.btn-text {
  background: none;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 12px 8px;
}
.btn-text:hover { color: var(--danger); }

/* ── Forms ───────────────────────────────────────────────── */
label { display: block; font-weight: 600; margin: 16px 0 7px; font-size: 0.95rem; letter-spacing: 0.005em; }
label .hint { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }

input[type="email"], input[type="text"], input[type="number"] {
  width: 100%;
  font: inherit;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
input::placeholder { color: var(--ink-faint); }
input:hover { border-color: #d9c9a8; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(23, 122, 92, 0.14); }

.error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #f0c4b8;
  border-radius: 12px;
  padding: 11px 15px;
  margin-top: 14px;
  font-size: 0.92rem;
  animation: viewIn 0.25s ease;
}

/* ── Login view ──────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.login-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 46px 42px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), #2f9e76, var(--gold));
}
.login-card h1 { font-size: 1.75rem; margin-top: 14px; }
.login-sub { color: var(--ink-soft); margin: 6px 0 10px; font-size: 1.02rem; }
.login-card form { text-align: left; }
.login-foot { color: var(--ink-soft); font-size: 0.85rem; margin: 24px 0 0; line-height: 1.7; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1d8a67, var(--accent-deep));
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  box-shadow: 0 8px 20px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.brand-mark.sm { width: 32px; height: 32px; font-size: 1.05rem; border-radius: 9px; }

/* ── Dashboard layout ────────────────────────────────────── */
.topbar {
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid #cbe2d5;
  box-shadow: 0 0 12px rgba(23, 122, 92, 0.12);
}
.pill.closed { background: #f0e9dc; color: var(--ink-soft); border-color: var(--line); box-shadow: none; }

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 30px 20px 64px;
}

.greeting { margin: 8px 0 24px; animation: viewIn 0.45s ease; }
.greeting-sub { color: var(--ink-soft); font-size: 1.06rem; margin: 6px 0 0; max-width: 640px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 22px;
  animation: viewIn 0.45s ease backwards;
}
.card:nth-of-type(2) { animation-delay: 0.05s; }
.card:nth-of-type(3) { animation-delay: 0.1s; }
.card:nth-of-type(4) { animation-delay: 0.15s; }
.card-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.card-desc { color: var(--ink-soft); margin: 0 0 20px; font-size: 0.98rem; }

.fine { color: var(--ink-soft); font-size: 0.87rem; margin: 13px 0 0; line-height: 1.65; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ── Offer card ──────────────────────────────────────────── */
.offer-card { border-top: 5px solid transparent; border-image: linear-gradient(90deg, var(--accent), #2f9e76, var(--gold)) 1; border-radius: var(--radius); position: relative; }
.offer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.price-block { text-align: right; }
.price-label { font-size: 0.82rem; color: var(--ink-soft); }
.price {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-deep), #1d8a67);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.offer-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: linear-gradient(180deg, #faf4e8, #f7f0e0);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 16px 18px;
}
.meta-label { font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.meta-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown { color: var(--accent-deep); font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.countdown.urgent { color: var(--danger); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ── Holdings ────────────────────────────────────────────── */
.holding-rows { margin-top: 12px; }
.holding-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px dashed var(--line);
}
.holding-row:last-child { border-bottom: none; }
.holding-row span { color: var(--ink-soft); }
.holding-row strong { font-variant-numeric: tabular-nums; }
.holding-row.highlight {
  background: linear-gradient(135deg, var(--gold-soft), #fbeed3);
  border: 1px solid #f0dcb4;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(201, 138, 27, 0.12);
}
.holding-row.highlight strong { color: var(--gold-deep); font-size: 1.2rem; }

/* ── Election status ─────────────────────────────────────── */
.status-line { display: flex; align-items: center; gap: 13px; margin-top: 10px; }
.status-dot { width: 14px; height: 14px; border-radius: 50%; background: #d8cfbc; flex-shrink: 0; }
.status-dot.pending { background: var(--gold); box-shadow: 0 0 0 6px var(--gold-soft), 0 0 14px rgba(201, 138, 27, 0.5); animation: pulse 2s ease-in-out infinite; }
.status-dot.declined { background: #cfc7b4; }
.status-none { color: var(--ink-soft); line-height: 1.7; }

/* ── Election widget ─────────────────────────────────────── */
.slider-row { margin: 20px 0 12px; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 0%), #e7ddc6 var(--fill, 0%));
  box-shadow: inset 0 1px 3px rgba(80, 60, 30, 0.18);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 32px; height: 32px;
  margin-top: -10px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 3px 10px var(--accent-glow);
  cursor: grab;
  transition: transform 0.12s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.1); }
input[type="range"]::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.05); }
input[type="range"]::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  background: #e7ddc6;
  box-shadow: inset 0 1px 3px rgba(80, 60, 30, 0.18);
}
input[type="range"]::-moz-range-progress {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-deep), #2f9e76);
}
input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  box-shadow: 0 3px 10px var(--accent-glow);
  cursor: grab;
}
input[type="range"]:focus { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(23, 122, 92, 0.2), 0 3px 10px var(--accent-glow); }

.shares-input-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.shares-input-wrap { position: relative; width: 230px; }
.shares-input-wrap input { padding-right: 72px; font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.shares-input-suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  font-size: 0.9rem;
  pointer-events: none;
}
.quick-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.note {
  border-radius: 12px;
  padding: 11px 15px;
  font-size: 0.9rem;
  margin: 12px 0;
  animation: viewIn 0.25s ease;
}
.note.warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f0d9b8; }
.note[hidden] { display: none; }

.proceeds-strip {
  display: grid;
  grid-template-columns: 1fr 1.45fr 1fr;
  gap: 12px;
  background: linear-gradient(180deg, #fbf7ec, #f6efdd);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 20px;
  margin-top: 18px;
  text-align: center;
}
.proceeds-label { font-size: 0.79rem; color: var(--ink-soft); margin-bottom: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.proceeds-value { font-size: 1.3rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.proceeds-value.money {
  background: linear-gradient(135deg, var(--accent-deep), #1d8a67);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.proceeds-item.big .proceeds-value { font-size: 2rem; }
@media (max-width: 560px) {
  .proceeds-strip { grid-template-columns: 1fr; gap: 14px; }
}

/* ── Tax estimator ───────────────────────────────────────── */
.rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  background: #faf7ef;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 16px;
}
.rate-row label { margin: 0; }
.rate-input-wrap { position: relative; width: 135px; }
.rate-input-wrap input { padding-right: 40px; font-weight: 700; font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.rate-suffix {
  position: absolute; right: 15px; top: 50%;
  transform: translateY(-50%); color: var(--ink-soft); font-weight: 600;
}

.tax-rows { border-top: 1px solid var(--line); }
.tax-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px dashed var(--line);
}
.tax-row span { color: var(--ink-soft); }
.tax-row strong { font-variant-numeric: tabular-nums; }
.tax-row.tax strong { color: var(--danger); }
.tax-row.net {
  border-bottom: none;
  background: linear-gradient(135deg, var(--accent-soft), #d5ebdd);
  border: 1px solid #cbe2d5;
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(23, 122, 92, 0.1);
}
.tax-row.net span { color: var(--accent-deep); font-weight: 700; }
.tax-row.net strong { color: var(--accent-deep); font-size: 1.5rem; letter-spacing: -0.02em; }

.tax-bar-wrap { margin-top: 20px; }
.tax-bar {
  display: flex;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: #ece3cd;
  box-shadow: inset 0 2px 5px rgba(80, 60, 30, 0.15);
}
.tax-bar-net { background: linear-gradient(90deg, #2f9e76, var(--accent)); transition: width 0.4s cubic-bezier(0.2, 0.7, 0.3, 1); }
.tax-bar-tax { background: linear-gradient(90deg, #d98a5a, var(--danger)); transition: width 0.4s cubic-bezier(0.2, 0.7, 0.3, 1); }
.tax-bar-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.87rem;
  color: var(--ink-soft);
  margin-top: 9px;
  flex-wrap: wrap;
  gap: 6px;
}
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.sw-net { background: var(--accent); }
.sw-tax { background: var(--danger); }

/* ── Submit / confirm ────────────────────────────────────── */
.submit-card { border-top: 5px solid var(--gold); }
.submit-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }

.confirm-card { border-top: 5px solid var(--accent); text-align: center; }
.confirm-check {
  width: 68px; height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), #d5ebdd);
  border: 2px solid #bfe0cd;
  color: var(--accent);
  font-size: 2.1rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  box-shadow: 0 6px 18px rgba(23, 122, 92, 0.18);
}
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.confirm-summary {
  max-width: 440px;
  margin: 20px auto;
  text-align: left;
  background: #faf7ef;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 8px 20px;
}
.confirm-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
}
.confirm-row:last-child { border-bottom: none; }
.confirm-row span { color: var(--ink-soft); }
.confirm-row strong { font-variant-numeric: tabular-nums; }

/* ── Checklist ───────────────────────────────────────────── */
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 4px;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.14s ease;
  border-radius: 8px;
}
.check-item:hover { background: rgba(23, 122, 92, 0.04); }
.check-item:last-of-type { border-bottom: none; }
.check-item input {
  appearance: none;
  -webkit-appearance: none;
  width: 24px; height: 24px;
  margin-top: 1px;
  border: 2px solid #d5c9ac;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.16s, border-color 0.16s, box-shadow 0.16s;
}
.check-item input:hover { border-color: var(--accent); }
.check-item input:checked {
  background: linear-gradient(135deg, #1d8a67, var(--accent-deep));
  border-color: var(--accent);
  box-shadow: 0 2px 8px var(--accent-glow);
}
.check-item input:checked::after {
  content: '';
  position: absolute;
  left: 7.5px; top: 3.5px;
  width: 6px; height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(42deg);
}
.check-item.done span { text-decoration: line-through; color: var(--ink-soft); }

.checklist-progress {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 18px;
}
.checklist-progress-bar {
  flex: 1;
  height: 11px;
  background: #ece3cd;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(80, 60, 30, 0.15);
}
.checklist-progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #2f9e76, var(--accent));
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}
#checklist-count { font-size: 0.88rem; color: var(--ink-soft); white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }

.page-foot { text-align: center; color: var(--ink-soft); font-size: 0.88rem; margin-top: 36px; line-height: 1.8; }

/* ── Closed-offer banner ─────────────────────────────────── */
.banner-closed {
  background: linear-gradient(135deg, #f5eddc, #efe4cb);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 22px;
  color: var(--ink-soft);
  font-size: 0.96rem;
  animation: viewIn 0.4s ease;
}
.banner-closed strong { color: var(--ink); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .page { padding: 22px 14px 56px; }
  .card { padding: 22px 18px; }
  .price { font-size: 2rem; }
  .offer-meta { grid-template-columns: 1fr 1fr; }
  .offer-meta .meta-item:last-child { grid-column: 1 / -1; }
  .btn-lg { width: 100%; }
  .submit-row { flex-direction: column; align-items: stretch; }
  .shares-input-wrap { width: 100%; }
  h1 { font-size: 1.65rem; }
}

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