/* Sanjeevini Customer Entry: forest green, sage and cream, with a warm gold accent. */
:root {
  --forest: #173f31; --g: #1f5c46; --g2: #2f7a5c; --sage: #8fb8a2; --mint: #e7f2ec; --mint2: #f1f7f3;
  --cream: #f7f4ec; --gold: #c99a3e; --gold-bg: #fbf3e2;
  --ink: #15201b; --grey: #5f6d65; --line: #e1e8e3; --card: #fff;
  --red: #b3261e; --red-bg: #fdecea; --amber: #94600c; --amber-bg: #fdf1dc; --blue: #2457a6; --blue-bg: #e7eefb;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(16,40,30,.05), 0 8px 24px -10px rgba(16,60,40,.18);
  --shadow-hi: 0 2px 4px rgba(16,40,30,.06), 0 18px 40px -14px rgba(16,60,40,.28);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Malayalam", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; color: var(--ink); }
body {
  font: 15px/1.5 var(--sans); -webkit-text-size-adjust: 100%; min-height: 100vh;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(143,184,162,.28), transparent 70%),
    radial-gradient(700px 380px at -10% 110%, rgba(201,154,62,.10), transparent 70%),
    var(--cream);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--g); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.boot { padding: 40vh 0; text-align: center; color: var(--grey); }

/* ---------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 5; color: #fff; padding: 12px 20px;
  background: linear-gradient(120deg, var(--forest), var(--g) 60%, var(--g2));
  display: flex; align-items: center; gap: 12px; overflow: hidden;
  box-shadow: 0 6px 20px -12px rgba(10,40,28,.6);
}
.top::after { /* soft leaf watermark */
  content: ""; position: absolute; right: -30px; top: -40px; width: 180px; height: 180px; opacity: .10; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 6c14 11 18 25 12 37-3 7-8 11-12 13-4-2-9-6-12-13-6-12-2-26 12-37z' fill='white'/%3E%3C/svg%3E") no-repeat center/contain;
  transform: rotate(-18deg);
}
.logo { width: 36px; height: 36px; border-radius: 11px; background: rgba(255,255,255,.14); display: grid; place-items: center; flex: none; }
.logo svg { width: 22px; height: 22px; }
.top .brand { font-family: var(--serif); font-weight: 650; font-size: 17px; line-height: 1.15; letter-spacing: .005em; }
.top .brand small { display: block; font-family: var(--sans); font-weight: 500; opacity: .75; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.top .sp { flex: 1; }
.me { display: flex; align-items: center; gap: 8px; font-size: 13px; position: relative; z-index: 1; }
.me .av { width: 30px; height: 30px; font-size: 12px; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.top button { position: relative; z-index: 1; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); color: #fff; padding: 7px 12px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; transition: background .15s; }
.top button:hover { background: rgba(255,255,255,.24); }
.demo-bar { background: var(--gold-bg); color: var(--amber); font-size: 12.5px; text-align: center; padding: 6px 12px; font-weight: 500; }

/* ---------------------------------------------------------------- nav */
nav.tabs { display: flex; gap: 6px; padding: 16px 20px 0; max-width: 1000px; margin: 0 auto; }
nav.tabs a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--grey); padding: 9px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
nav.tabs a:hover { background: rgba(255,255,255,.6); color: var(--g); }
nav.tabs a.on { background: var(--card); color: var(--g); box-shadow: var(--shadow); }
nav.tabs a.add { margin-left: auto; background: var(--g); color: #fff; box-shadow: 0 8px 18px -8px rgba(31,92,70,.7); }
nav.tabs a.add:hover { background: var(--g2); color: #fff; }
nav.tabs a.add.on { background: var(--forest); }
main { max-width: 1000px; margin: 0 auto; padding: 18px 20px 110px; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .top { padding: 10px 16px; }
  .me span { display: none; }
  .top button span { display: none; }
  nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; margin: 0; max-width: none; gap: 0;
    background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px 10px calc(8px + env(safe-area-inset-bottom)); justify-content: space-around; align-items: flex-end; }
  nav.tabs a { flex: 1; flex-direction: column; gap: 3px; font-size: 11.5px; padding: 6px 4px; background: none !important; box-shadow: none !important; color: var(--grey); }
  nav.tabs a svg.i { width: 22px; height: 22px; }
  nav.tabs a.on { color: var(--g); }
  .top .brand { font-size: 15px; }
  .hello h1 { font-size: 24px; }
  nav.tabs a.add { flex: none; margin: -26px 8px 0; width: 58px; height: 58px; border-radius: 50%; padding: 0; justify-content: center;
    background: linear-gradient(140deg, var(--g2), var(--forest)) !important; color: #fff; box-shadow: 0 10px 22px -8px rgba(23,63,49,.8) !important; }
  nav.tabs a.add span { display: none; }
  nav.tabs a.add svg.i { width: 26px; height: 26px; stroke-width: 2.2; }
  main { padding: 14px 16px 120px; }
}

/* ---------------------------------------------------------------- type + layout */
h1 { font-family: var(--serif); font-weight: 650; font-size: 28px; line-height: 1.15; margin: 4px 0 4px; letter-spacing: -.01em; color: var(--forest); }
.sub { color: var(--grey); margin: 0 0 18px; font-size: 14px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .09em; margin: 26px 0 10px; color: var(--g); display: flex; align-items: center; gap: 8px; }
h2 .count { background: var(--mint); color: var(--g); border-radius: 999px; padding: 1px 8px; font-size: 11.5px; letter-spacing: 0; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; border: 1px solid rgba(225,232,227,.7); }
.muted { color: var(--grey); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sp { flex: 1; }
.head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head .sub { margin: 0; }

/* ---------------------------------------------------------------- forms */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.fs { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--g); }
.fs::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fs:first-child { margin-top: 0; }
.fs .dot { width: 26px; height: 26px; border-radius: 8px; background: var(--mint); display: grid; place-items: center; }
.fs .dot svg.i { width: 15px; height: 15px; }
@media (max-width: 640px) { .form { grid-template-columns: minmax(0, 1fr); } .card { padding: 16px; } }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--grey); }
label.f .req { margin-left: 4px; color: var(--gold); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
input, select, textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--mint2); font-size: 16px; transition: border-color .15s, box-shadow .15s, background .15s; }
input:hover, select:hover, textarea:hover { border-color: #c9d8ce; }
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; background: #fff; border-color: var(--g2); box-shadow: 0 0 0 4px rgba(47,122,92,.14); }
label.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink); font-weight: 500; background: var(--gold-bg); border-radius: 12px; padding: 12px 14px; }
label.check input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--g); }
label.check.plain { background: none; padding: 0; }
.btn { border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 650; cursor: pointer; background: linear-gradient(140deg, var(--g2), var(--g)); color: #fff;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; box-shadow: 0 8px 18px -10px rgba(31,92,70,.9); transition: transform .12s, box-shadow .15s, filter .15s; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.ghost { background: var(--mint); color: var(--g); box-shadow: none; }
.btn.line { background: #fff; color: var(--g); border: 1px solid var(--line); box-shadow: none; }
.btn.wa { background: linear-gradient(140deg, #2bbf68, #1a9a50); box-shadow: 0 8px 18px -10px rgba(26,154,80,.9); }
.btn.small { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.btn svg.i { width: 16px; height: 16px; }
.warn { background: var(--amber-bg); color: var(--amber); border-radius: 12px; padding: 11px 13px; font-size: 14px; }
.okmsg { background: var(--mint); color: var(--g); border-radius: 12px; padding: 11px 13px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.err { color: var(--red); font-size: 14px; }

/* ---------------------------------------------------------------- chips + avatars */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.st-New { background: var(--blue-bg); color: var(--blue); }
.st-Contacted { background: var(--amber-bg); color: var(--amber); }
.st-Booked { background: #dcf2e4; color: #17663d; }
.st-Visited { background: var(--g); color: #fff; }
.st-Not-interested, .st-Archived { background: #eef0ef; color: #6b746f; }
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 15px; color: #fff; letter-spacing: .02em; }
.av.big { width: 64px; height: 64px; font-size: 22px; font-family: var(--serif); }

/* ---------------------------------------------------------------- lists */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 16px; padding: 13px 16px; box-shadow: var(--shadow);
  text-decoration: none; color: inherit; border: 1px solid rgba(225,232,227,.7); transition: transform .15s, box-shadow .15s; animation: rise .3s ease both; }
.item:hover { transform: translateY(-2px); box-shadow: var(--shadow-hi); }
.item .body { min-width: 0; }
.item .name { font-weight: 650; font-size: 15.5px; }
.item .meta { font-size: 13px; color: var(--grey); display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.item .meta span + span::before { content: "·"; margin-right: 6px; color: #b7c2bb; }
.item .right { margin-left: auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.due { font-size: 12px; font-weight: 650; display: inline-flex; gap: 4px; align-items: center; color: var(--grey); }
.due svg.i { width: 13px; height: 13px; }
.due.over { color: var(--red); }
.due.today { color: var(--amber); }
.empty { text-align: center; color: var(--grey); padding: 34px 16px; background: rgba(255,255,255,.55); border: 1.5px dashed #cfdcd4; border-radius: 16px; }
.empty .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--mint); color: var(--g); display: grid; place-items: center; margin: 0 auto 10px; }
.empty .ico svg.i { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- filters */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.search { position: relative; }
.search svg.i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--grey); pointer-events: none; }
.search input { padding-left: 40px; background: #fff; }
.filters select { background: #fff; }
@media (max-width: 640px) { .filters { grid-template-columns: 1fr 1fr; } .filters .search { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { position: relative; background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 1px solid rgba(225,232,227,.7); overflow: hidden; }
.stat .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 10px; }
.stat b { display: block; font-family: var(--serif); font-size: 32px; line-height: 1; color: var(--forest); font-weight: 650; }
.stat span { font-size: 12.5px; color: var(--grey); font-weight: 500; }
.stat.c1 .ico { background: var(--mint); color: var(--g); }
.stat.c2 .ico { background: var(--blue-bg); color: var(--blue); }
.stat.c3 .ico { background: var(--red-bg); color: var(--red); }
.stat.c4 .ico { background: var(--gold-bg); color: var(--amber); }
.stat.c3.hot { background: linear-gradient(160deg, #fff, var(--red-bg)); }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat b { font-size: 28px; } }
.hello { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.hello .date { color: var(--grey); font-size: 13.5px; }

/* pipeline bar */
.pipe { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 10px 0 8px; }
.pipe i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--grey); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------------------------------------------------------------- customer page */
.hero { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero h1 { margin: 0; }
.hero .meta { color: var(--grey); font-size: 14px; margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; }
.statusbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 2px; padding: 5px; background: var(--mint2); border-radius: 14px; border: 1px solid var(--line); }
.statusbar button { flex: 1; min-width: 88px; border: 0; background: none; border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 13px; font-weight: 650; color: var(--grey); transition: background .15s, color .15s; }
.statusbar button:hover { background: #fff; color: var(--g); }
.statusbar button.on { background: var(--g); color: #fff; box-shadow: 0 6px 14px -8px rgba(31,92,70,.9); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.fact { background: var(--mint2); border-radius: 14px; padding: 11px 13px; border: 1px solid var(--line); min-width: 0; }
.fact .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); font-weight: 650; display: flex; align-items: center; gap: 6px; }
.fact .k svg.i { width: 13px; height: 13px; }
.fact .v { font-weight: 600; margin-top: 3px; overflow-wrap: anywhere; }
.fact.wide { grid-column: 1 / -1; }
.fact input[type=date] { padding: 6px 9px; background: #fff; width: 100%; max-width: 190px; margin-top: 4px; font-size: 14px; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr 1fr; } }
.timeline { position: relative; margin-top: 14px; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.note { position: relative; padding: 2px 0 14px; }
.note::before { content: ""; position: absolute; left: -19px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--g2); }
.note .by { font-size: 12px; color: var(--grey); margin-top: 2px; }
.noteform { display: flex; gap: 8px; }
.noteform input { background: #fff; }

/* ---------------------------------------------------------------- sign-in */
.signin { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.signin .art {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(150deg, var(--forest), var(--g) 55%, var(--g2));
}
.signin .art::before, .signin .art::after {
  content: ""; position: absolute; opacity: .12; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M32 6c14 11 18 25 12 37-3 7-8 11-12 13-4-2-9-6-12-13-6-12-2-26 12-37z' fill='white'/%3E%3C/svg%3E") no-repeat center/contain;
}
.signin .art::before { width: 420px; height: 420px; right: -120px; bottom: -110px; transform: rotate(-24deg); }
.signin .art::after { width: 200px; height: 200px; left: -50px; top: 30%; transform: rotate(30deg); opacity: .07; }
.signin .art .logo { width: 52px; height: 52px; border-radius: 16px; }
.signin .art .logo svg { width: 30px; height: 30px; }
.signin .art h2 { font-family: var(--serif); text-transform: none; letter-spacing: -.01em; font-size: 40px; line-height: 1.1; color: #fff; margin: 0 0 12px; font-weight: 650; display: block; }
.signin .art p { color: rgba(255,255,255,.8); max-width: 380px; margin: 0; }
.signin .art .foot { font-size: 12px; color: rgba(255,255,255,.6); letter-spacing: .08em; text-transform: uppercase; }
.signin .pane { display: grid; place-items: center; padding: 32px 20px; }
.signin .box { width: 100%; max-width: 360px; }
.signin .box h1 { margin-bottom: 6px; }
.signin form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.signin .btn { justify-content: center; padding: 13px; }
@media (max-width: 760px) {
  .signin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .signin .art { padding: 28px 22px 34px; gap: 22px; }
  .signin .art h2 { font-size: 28px; }
  .signin .art .foot { display: none; }
}

#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); background: var(--forest); color: #fff;
  padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .22s; z-index: 20; max-width: 90vw;
  box-shadow: 0 12px 30px -10px rgba(10,40,28,.6); display: flex; align-items: center; gap: 8px; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- slots */
.slotform { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .slotform { grid-template-columns: 1fr 1fr; } }
.slot { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow); border: 1px solid rgba(225,232,227,.7); }
.slot .when { font-family: var(--serif); font-weight: 650; font-size: 18px; color: var(--forest); min-width: 78px; }
.slot .body { min-width: 0; flex: 1; }
.slot .name { font-weight: 650; }
.slot .meta { font-size: 13px; color: var(--grey); }
.slot .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.slot.held { border-left: 4px solid var(--gold); }
.slot.booked { border-left: 4px solid var(--g); }
.slot.closed { opacity: .6; }
.sl-open { background: var(--blue-bg); color: var(--blue); }
.sl-held { background: var(--amber-bg); color: var(--amber); }
.sl-booked { background: #dcf2e4; color: #17663d; }
.sl-closed { background: #eef0ef; color: #6b746f; }
@media (max-width: 640px) {
  .slot { flex-wrap: wrap; }
  .slot .right { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  nav.tabs a.t-today { order: 1; } nav.tabs a.t-list { order: 2; } nav.tabs a.add { order: 3; } nav.tabs a.t-slots { order: 4; }
}
