/* YASSA CRM. Paper, ink and one red (salihyasa.com: Anton + Geist, #0a0a0a / #f4f2ee / #e10600).
   Phones first: everything below is one column; wider screens get the side menu and the lead table. */

:root {
  /* fixed: the black chrome (side menu, drawer head) and the text on it */
  --paper: #f4f2ee;
  --ink: #0a0a0a;
  --ink-2: #2b2a28;
  /* themed: page, cards, text and the emphasis blocks inside the page */
  --bg: #f4f2ee;
  --surface: #ffffff;
  --fg: #0a0a0a;
  --fg-2: #2b2a28;
  --block: #0a0a0a;
  --block-2: #2b2a28;
  --muted: #75726b;
  --line: #e0dcd3;
  --soft: #ece9e2;
  --red: #e10600;
  --red-ink: #b00500;
  --red-soft: #fdebe9;
  --green: #14703f;
  --green-soft: #e4f4ea;
  --amber: #8a5a00;
  --amber-soft: #fff1cf;
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
}

/* Siyah mod. The same red; the page goes near-black and cards lift off it. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211;
  --surface: #1c1b19;
  --fg: #f4f2ee;
  --fg-2: #d6d2ca;
  --block: #262523;
  --block-2: #4a4843;
  --muted: #a09c93;
  --line: #33312d;
  --soft: #2a2927;
  --red-ink: #ff6f66;
  --red-soft: #3a1512;
  --green: #55c992;
  --green-soft: #12301f;
  --amber: #f0b84a;
  --amber-soft: #3a2c08;
}

:root[data-theme="dark"] .btn.ink {
  background: #f4f2ee;
  color: #0a0a0a;
}

:root[data-theme="dark"] .btn.primary:hover {
  background: #b00500;
}

:root[data-theme="dark"] .stage.s0 {
  background: #2e2d2a;
}

:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .drawer {
  border: 1px solid var(--line);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.45 var(--text);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.ic {
  fill: currentColor;
  flex: none;
}

/* ---------- buttons, fields, pills ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn.primary {
  background: var(--red);
  color: #fff;
}

.btn.primary:hover {
  background: var(--red-ink);
}

.btn.ink {
  background: var(--block);
  color: var(--paper);
}

.btn.ink:hover {
  background: var(--block-2);
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--fg);
}

.btn.ghost:hover {
  border-color: var(--fg);
}

.btn.ghost.danger {
  color: var(--red-ink);
}

.btn.wa {
  background: var(--surface);
  border-color: var(--green);
  color: var(--green);
}

.btn.wa:hover {
  background: var(--green-soft);
}

.btn.sm {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: 8px;
}

.btn.big {
  width: 100%;
  min-height: 50px;
  font-size: 16px;
}

.linkBtn {
  background: none;
  border: 0;
  padding: 6px 2px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.iconBtn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.iconBtn:hover {
  background: var(--soft);
}

.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select,
.field textarea,
.toolbar input,
#leadNote,
.folderSelect {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  font-size: 16px;
}

.field textarea,
#leadNote {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar input:focus,
#leadNote:focus {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}

.formError {
  min-height: 0;
  color: var(--red-ink);
  font-size: 13.5px;
  font-weight: 500;
}

.hint,
.mutedLine {
  color: var(--muted);
  font-size: 13.5px;
}

.notice {
  margin-bottom: 14px;
  padding: 11px 14px;
  border-left: 3px solid var(--red);
  background: var(--red-soft);
  border-radius: 0 10px 10px 0;
  font-size: 14px;
}

.empty {
  padding: 44px 18px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 600;
  font-style: normal;
  white-space: nowrap;
}

.pill.good,
.pill.st-sale {
  background: var(--green-soft);
  color: var(--green);
}

.pill.mid,
.pill.st-meeting_attended {
  background: var(--amber-soft);
  color: var(--amber);
}

.pill.bad,
.pill.st-lost {
  background: var(--red-soft);
  color: var(--red-ink);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.warn {
  color: var(--red-ink);
  font-style: normal;
  font-weight: 600;
}

/* ---------- sign-in ---------- */

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.loginArt {
  display: none;
}

.loginBox {
  width: min(400px, 100%);
  display: grid;
  gap: 14px;
}

.loginBox h1 {
  font: 400 34px/1.1 var(--display);
  letter-spacing: 0.01em;
}

.loginLogo {
  width: 190px;
  height: auto;
  margin-bottom: 6px;
}

@media (min-width: 900px) {
  .login:not(.single) {
    grid-template-columns: 1.05fr 1fr;
    padding: 0;
    place-items: stretch;
  }

  .login:not(.single) .loginArt {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    background: var(--ink);
    color: var(--paper);
  }

  .loginArt img {
    width: 240px;
    height: auto;
  }

  .loginArt p {
    font: 400 clamp(44px, 5.2vw, 84px) / 1.1 var(--display);
    letter-spacing: 0.005em;
  }

  .login:not(.single) .loginBox {
    align-self: center;
    justify-self: center;
  }

  .login:not(.single) .loginLogo {
    display: none;
  }
}

/* ---------- shell ---------- */

.side {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 10px 16px 0;
}

.sideBrand {
  grid-area: 1 / 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.sideBrand img {
  width: 104px;
  height: auto;
}

.sideBrand span {
  font: 400 15px/1 var(--display);
  letter-spacing: 0.12em;
  color: #8f8c85;
  padding-bottom: 3px;
}

.sideUser {
  grid-area: 1 / 2;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
}

.who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.who small {
  display: none;
}

.who strong {
  font-weight: 500;
  color: #cfccc5;
}

.whoBtns {
  display: flex;
  gap: 2px;
}

.sideLink {
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 8px 6px;
  color: #a3a099;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sideLink:hover {
  color: #fff;
}

.nav {
  grid-area: 2 / 1 / 3 / -1;
  display: flex;
  gap: 2px;
  margin: 0 -16px;
  padding: 4px 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.navBtn {
  flex: none;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 11px 10px 10px;
  color: #a3a099;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.navBtn.on {
  color: #fff;
  border-bottom-color: var(--red);
}

.main {
  padding: 18px 16px 90px;
  min-width: 0;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 16px;
}

.top h1 {
  font: 400 30px/1.1 var(--display);
  letter-spacing: 0.01em;
}

.topActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.topActions:empty {
  display: none;
}

@media (min-width: 1000px) {
  .app {
    display: grid;
    grid-template-columns: 228px minmax(0, 1fr);
    min-height: 100dvh;
  }

  .side {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 26px 14px 18px;
  }

  .sideBrand {
    padding: 0 10px 26px;
  }

  .sideBrand img {
    width: 136px;
  }

  .nav {
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .navBtn {
    text-align: left;
    padding: 11px 12px;
    border-bottom: 0;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    font-size: 14.5px;
  }

  .navBtn:hover {
    color: #fff;
  }

  .navBtn.on {
    border-left-color: var(--red);
    background: #171716;
  }

  .sideUser {
    margin-top: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 10px 0;
    border-top: 1px solid #262624;
  }

  .who strong {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
  }

  .who small {
    display: block;
    color: #8f8c85;
    font-size: 12px;
  }

  .whoBtns {
    margin-left: -6px;
  }

  .main {
    padding: 30px 34px 80px;
  }

  .top {
    margin-bottom: 22px;
  }

  .top h1 {
    font-size: 46px;
  }
}

/* ---------- lead funnel ---------- */

.funnel {
  display: grid;
  grid-template-columns: 0.8fr 1.28fr 1.1fr 1.02fr 0.8fr;
  gap: 2px;
}

.stage {
  --notch: 7px;
  position: relative;
  display: grid;
  gap: 2px;
  justify-items: start;
  min-width: 0;
  padding: 12px 4px 11px calc(var(--notch) + 6px);
  border: 0;
  color: #fff;
  text-align: left;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%, var(--notch) 50%);
  transition: filter 0.15s;
}

.stage:first-child {
  padding-left: 10px;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% 50%, calc(100% - var(--notch)) 100%, 0 100%);
  border-radius: 10px 0 0 10px;
}

.stage b {
  font: 400 28px/1.1 var(--display);
}

.stage span {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 560px) {
  .funnel {
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
  }

  .stage {
    --notch: 12px;
    padding: 14px 8px 13px calc(var(--notch) + 12px);
  }

  .stage:first-child {
    padding-left: 16px;
  }

  .stage b {
    font-size: 34px;
  }

  .stage span {
    font-size: 11px;
    letter-spacing: 0.04em;
  }
}

.stage.s0 {
  background: #0a0a0a;
}

.stage.s1 {
  background: #3d0a07;
}

.stage.s2 {
  background: #720b06;
}

.stage.s3 {
  background: #aa0903;
}

.stage.s4 {
  background: #e10600;
}

.stage:hover {
  filter: brightness(1.18);
}

.stage.on::after {
  content: "";
  position: absolute;
  left: calc(var(--notch) + 6px);
  right: calc(var(--notch) + 6px);
  bottom: 5px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.funnelMeta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 10px 0 16px;
  font-size: 13.5px;
  color: var(--muted);
}

.funnelMeta b {
  color: var(--fg);
  font-weight: 600;
}

.metaBtn {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.metaBtn.on,
.metaBtn:hover {
  color: var(--red-ink);
}

.archiveBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--block);
  color: var(--paper);
  border-radius: var(--radius);
}

.archiveBar strong {
  display: block;
  font: 400 22px/1.1 var(--display);
  letter-spacing: 0.02em;
}

.archiveBar span {
  font-size: 13px;
  color: #b9b5ac;
}

.archiveBar .btn.ghost {
  color: var(--paper);
  border-color: #4a4944;
}

.archiveBar .btn.ink {
  background: var(--red);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.toolbar input {
  flex: 1 1 220px;
  max-width: 420px;
}

/* ---------- lead rows ---------- */

.leadHead {
  display: none;
}

.lead {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "who date"
    "btns btns"
    "status status"
    "acts acts";
  gap: 10px 12px;
  margin-bottom: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lead.fresh {
  box-shadow: inset 3px 0 0 var(--red);
}

.lDate {
  grid-area: date;
  text-align: right;
  line-height: 1.25;
}

.lDate b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.lDate small {
  color: var(--muted);
  font-size: 12px;
}

.lWho {
  grid-area: who;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}

.lWho strong {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lWho:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.src {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--soft);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  color: var(--muted);
  vertical-align: 2px;
}

.lPhone {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--fg-2);
}

.lMsg,
.lNote {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  color: var(--muted);
}

.lNote {
  color: var(--fg-2);
}

.lBtns {
  grid-area: btns;
  display: flex;
  gap: 8px;
}

.lBtns .btn {
  flex: 1;
  min-height: 44px;
  font-size: 15px;
}

.noPhone {
  font-size: 13px;
  color: var(--muted);
}

.lStatus {
  grid-area: status;
  min-width: 0;
}

.stepper {
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.step {
  flex: 1 1 auto;
  min-height: 38px;
  min-width: 0;
  padding: 0 3px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.step:first-child {
  border-radius: 9px 0 0 9px;
}

.step:nth-child(5) {
  border-radius: 0 9px 9px 0;
}

.step.done {
  background: var(--block-2);
  border-color: var(--block-2);
  color: #fff;
}

.step.now {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-weight: 700;
}

.step:not(.now):hover {
  border-color: var(--fg);
  color: var(--fg);
}

.step.done:hover {
  color: #fff;
}

.step.lostBtn {
  flex: none;
  margin-left: 4px;
  padding: 0 7px;
  border-style: dashed;
  border-radius: 9px;
}

.step.lostBtn.now {
  background: var(--block);
  border-color: var(--block);
  border-style: solid;
}

.stepper.isLost .step:not(.lostBtn) {
  opacity: 0.45;
}

.lActs {
  grid-area: acts;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.act.call {
  background: var(--red-soft);
  color: var(--red-ink);
}

.act.wa {
  background: var(--green-soft);
  color: var(--green);
}

.act.back {
  background: var(--block);
  color: #fff;
}

.act.none {
  background: none;
  padding-left: 0;
  color: var(--muted);
  font-weight: 400;
}

@media (min-width: 1000px) {
  .leadHead,
  .lead {
    display: grid;
    grid-template-columns: 112px minmax(170px, 1.15fr) 152px 388px minmax(150px, 1fr);
    grid-template-areas: "date who btns status acts";
    align-items: center;
    gap: 14px;
  }

  .leadHead {
    padding: 0 16px 8px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .lead {
    margin-bottom: 6px;
    padding: 12px 16px;
  }

  .lDate {
    text-align: left;
  }

  .lDate b {
    font-size: 14px;
  }

  .lBtns .btn {
    min-height: 36px;
    font-size: 13.5px;
  }

  .step {
    min-height: 34px;
    padding: 0 8px;
    font-size: 12.5px;
  }
}

@media (min-width: 1000px) and (max-width: 1380px) {
  .leadHead {
    display: none;
  }

  .lead {
    grid-template-columns: 112px minmax(170px, 1fr) 152px 388px;
    grid-template-areas:
      "date who btns status"
      ". acts acts acts";
    row-gap: 8px;
  }
}

/* ---------- drawer, modal, sheet, toast ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: end center;
  background: rgba(10, 10, 10, 0.5);
}

.overlay.atSide {
  place-items: stretch end;
}

.drawer {
  width: min(480px, 100%);
  height: 100dvh;
  overflow-y: auto;
  background: var(--bg);
  box-shadow: -18px 0 50px rgba(10, 10, 10, 0.25);
}

.drawer.in {
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
}

.drawer > header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  background: var(--ink);
  color: var(--paper);
}

.drawer > header .iconBtn:hover {
  background: #262624;
}

.drawer > header h2 {
  font: 400 24px/1.15 var(--display);
  letter-spacing: 0.01em;
}

.drawer > header p {
  font-size: 13px;
  color: #b9b5ac;
}

.drawerBody {
  display: grid;
  gap: 20px;
  padding: 16px 16px 40px;
}

.drawerBody .row .btn {
  flex: 1;
  min-height: 48px;
  font-size: 16px;
}

.drawerBody section {
  display: grid;
  gap: 8px;
}

.drawerBody h3,
.dayTitle {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.bubble {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  font-size: 14.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
}

.drawerEnd {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.timeline li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--line);
  font-size: 14px;
}

.timeline li.t-call {
  border-left-color: var(--red);
}

.timeline li.t-whatsapp {
  border-left-color: var(--green);
}

.timeline time {
  flex: none;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.modal {
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding: 18px 16px 22px;
  background: var(--bg);
  border-radius: 18px 18px 0 0;
}

.modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal h2 {
  font: 400 24px/1.15 var(--display);
  letter-spacing: 0.01em;
}

.modalBody {
  display: grid;
  gap: 12px;
}

.modal > footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal > footer .btn {
  flex: 1;
}

.grid2 {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .overlay {
    place-items: center;
    padding: 20px;
  }

  .overlay.atSide {
    padding: 0;
  }

  .modal {
    width: min(440px, 100%);
    padding: 22px;
    border-radius: 16px;
  }

  .modal.wide {
    width: min(720px, 100%);
  }

  .modal > footer .btn {
    flex: none;
  }

  .grid2 {
    grid-template-columns: 1fr 1fr;
  }

  .grid2 .full {
    grid-column: 1 / -1;
  }
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: grid;
  gap: 12px;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  background: var(--block);
  color: var(--paper);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -14px 40px rgba(10, 10, 10, 0.3);
  animation: rise 0.2s ease-out;
}

@keyframes rise {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}

.sheetHead strong {
  display: block;
  font: 400 22px/1.15 var(--display);
  letter-spacing: 0.01em;
}

.sheetHead span {
  font-size: 13.5px;
  color: #b9b5ac;
}

.sheetBtns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sheetBtns .btn {
  min-height: 48px;
}

.sheetBtns .btn.ink {
  background: #262624;
  color: #fff;
}

.sheetBtns .btn.ink:hover {
  background: var(--red);
}

.sheetBtns .btn.ghost {
  color: #b9b5ac;
  border-color: #3a3936;
}

@media (min-width: 760px) {
  .sheet {
    left: 50%;
    right: auto;
    bottom: 20px;
    width: 620px;
    transform: translateX(-50%);
    border-radius: 16px;
    animation: none;
  }

  .sheetBtns {
    grid-template-columns: repeat(6, 1fr);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 90;
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--block);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.bad {
  background: var(--red);
}

/* ---------- cards (follow up, customers, checks, team) ---------- */

.cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  align-items: start;
}

.card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.card.off {
  background: transparent;
  border-style: dashed;
}

.card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card > header strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.card > header small {
  color: var(--muted);
  font-size: 13px;
}

.card > footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 0;
}

.card dt {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.card dd {
  margin: 1px 0 0;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.count {
  font: 400 26px/1 var(--display);
  color: var(--red);
}

.fuSteps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.fuSteps label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
}

.fuSteps label:hover {
  background: var(--bg);
}

.fuSteps input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--red);
}

.fuSteps b {
  font-weight: 600;
}

.fuSteps i {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.fuSteps small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.fuSteps li.done b {
  text-decoration: line-through;
  color: var(--muted);
}

.fold {
  margin-top: 18px;
}

.fold > summary {
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
}

.fold.inner {
  margin-top: 0;
}

.fold.inner > summary {
  padding: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}

.checkTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.checkTop small {
  color: var(--muted);
  font-size: 12.5px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metrics div {
  padding: 10px 8px;
  background: var(--bg);
  border-radius: 10px;
}

.metrics b {
  display: block;
  font: 400 20px/1.15 var(--display);
  letter-spacing: 0.01em;
}

.metrics span {
  font-size: 11.5px;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags i {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  font-style: normal;
}

.histRow {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.histRow:first-of-type {
  margin-top: 8px;
}

/* ---------- arayanlar ---------- */

.people {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  margin-bottom: 8px;
}

.person {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 8px;
  padding: 14px 16px;
  background: var(--block);
  color: var(--paper);
  border-radius: 14px;
}

.person strong {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 600;
}

.person b {
  display: block;
  font: 400 32px/1.1 var(--display);
}

.person div:nth-child(2) b {
  color: #ff4a44;
}

.person span {
  font-size: 12px;
  color: #a3a099;
}

.dayTitle {
  margin: 22px 0 8px;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feed li {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 4px 10px;
  align-items: center;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.feed li:first-child {
  border-top: 0;
}

.feed time {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.feedIcon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red-ink);
}

.feed li.whatsapp .feedIcon {
  background: var(--green-soft);
  color: var(--green);
}

.feed p span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.feed .pill {
  grid-column: 3;
  justify-self: start;
}

@media (min-width: 760px) {
  .feed li {
    grid-template-columns: auto auto 1fr auto;
  }

  .feed .pill {
    grid-column: auto;
  }
}

/* ---------- ödemeler ---------- */

.pinBox {
  width: min(360px, 100%);
  margin: 6vh auto 0;
  display: grid;
  gap: 12px;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
}

.pinBox h2 {
  font: 400 28px/1.1 var(--display);
}

.pinBox > * {
  min-width: 0;
}

.pinBox input {
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  text-align: center;
  font-size: 28px;
  letter-spacing: 0.35em;
}

.pinBox input:focus {
  outline: none;
  border-color: var(--fg);
}

.stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.stat {
  display: grid;
  gap: 2px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.stat:first-child {
  background: var(--block);
  border-color: var(--block);
  color: var(--paper);
}

.stat span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat:first-child span,
.stat:first-child small {
  color: #a3a099;
}

.stat b {
  font: 400 34px/1.15 var(--display);
  letter-spacing: 0.01em;
}

.stat small {
  color: var(--muted);
  font-size: 13px;
}

.bars {
  display: grid;
  gap: 8px;
  padding: 4px 0 6px;
}

.bar {
  display: grid;
  grid-template-columns: minmax(90px, 160px) 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13.5px;
}

.bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar i {
  height: 10px;
  width: var(--w);
  background: var(--red);
  border-radius: 3px;
}

.bar b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dueList {
  display: grid;
  gap: 8px;
}

.due {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.due.bad {
  box-shadow: inset 3px 0 0 var(--red);
}

.dueWho strong {
  display: block;
  font-size: 15.5px;
}

.dueWho small,
.dueWhen small {
  color: var(--muted);
  font-size: 12.5px;
}

.dueWho small {
  display: block;
}

.dueWho .dueNote {
  margin-top: 2px;
  color: var(--fg-2);
  white-space: pre-line;
}

.dueWhen {
  text-align: right;
}

.dueWhen b {
  display: block;
  font-size: 14px;
}

.due.bad .dueWhen b {
  color: var(--red-ink);
}

.dueAmount {
  font: 400 24px/1.1 var(--display);
}

.dueBtns {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.lockLine {
  margin-top: 18px;
  text-align: center;
}

@media (min-width: 900px) {
  .due {
    grid-template-columns: minmax(180px, 1.4fr) minmax(130px, 1fr) minmax(110px, auto) auto;
  }

  .dueWhen {
    text-align: left;
  }
}

/* ---------- salon videoları ---------- */

.mediaWrap {
  display: grid;
  gap: 16px;
}

.folderList {
  display: none;
}

.library {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.library > header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.library h2 {
  font: 400 26px/1.15 var(--display);
  letter-spacing: 0.01em;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 9px 14px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  color: var(--muted);
  font-weight: 600;
}

.tab.on {
  color: var(--fg);
  border-bottom-color: var(--red);
}

.assets {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.asset {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #6e6b65;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  overflow: hidden;
}

.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb video {
  opacity: 0;
  transition: opacity 0.25s;
}

.thumb video.ready {
  opacity: 1;
}

.asset strong {
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset small {
  color: var(--muted);
  font-size: 12px;
}

.assetBtns {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.assetBtns .btn {
  flex: 1 1 auto;
  padding: 0 8px;
}

.upload {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 14px;
  margin-bottom: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  overflow: hidden;
}

.upload i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: var(--w);
  background: var(--red);
  transition: width 0.2s;
}

.upload.ok i {
  background: var(--green);
}

.player {
  display: grid;
  place-items: center;
  background: var(--ink);
  border-radius: 12px;
  overflow: hidden;
}

.player video,
.player img {
  max-width: 100%;
  max-height: 70dvh;
}

@media (min-width: 900px) {
  .mediaWrap {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
  }

  .folderSelect {
    display: none;
  }

  .folders {
    position: sticky;
    top: 20px;
  }

  .folderList {
    display: grid;
    gap: 2px;
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
    margin-bottom: 10px;
  }

  .folderBtn {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    text-align: left;
    font-size: 14px;
  }

  .folderBtn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .folderBtn b {
    font-weight: 500;
    color: var(--muted);
  }

  .folderBtn:hover {
    background: var(--soft);
  }

  .folderBtn.on {
    background: var(--block);
    color: #fff;
  }

  .folderBtn.on b {
    color: #b9b5ac;
  }

  .assets {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

/* ---------- WhatsApp modal ---------- */

.bigLine {
  font: 400 26px/1.15 var(--display);
  letter-spacing: 0.01em;
}

.bigLine.ok {
  color: var(--green);
}

.qr {
  display: grid;
  place-items: center;
}

.qr img {
  width: min(280px, 100%);
  height: auto;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

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

/* ---------- ayarlar ---------- */

.dayTitle.first {
  margin-top: 0;
}

.addLine {
  margin: 14px 0;
}

.notice .linkBtn {
  color: var(--red-ink);
  font-size: inherit;
  font-weight: 600;
  padding: 0;
}

/* ---------- customer cards: plan colour and days to the next payment ---------- */

.plan-15 {
  --plan: #e10600;
  --plan-on: #ffffff;
}

.plan-30 {
  --plan: var(--fg);
  --plan-on: var(--bg);
}

.plan-90 {
  --plan: #b7791f;
  --plan-on: #ffffff;
}

.plan-7,
.plan-14 {
  --plan: #8a0a05;
  --plan-on: #ffffff;
}

.plan-0 {
  --plan: var(--muted);
  --plan-on: var(--bg);
}

.planPill {
  background: var(--plan, var(--soft));
  color: var(--plan-on, var(--fg));
}

.card.cust {
  box-shadow: inset 4px 0 0 var(--plan, transparent);
}

.card.cust.off {
  box-shadow: none;
}

.card.cust > header .planPill {
  margin-bottom: 7px;
}

.card.cust dl .wide {
  grid-column: 1 / -1;
}

.planLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.dueBadge {
  flex: none;
  text-align: right;
}

.dueBadge b {
  display: block;
  font: 400 22px/1.15 var(--display);
  letter-spacing: 0.01em;
}

.dueBadge small {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.dueBadge.bad b {
  color: var(--red-ink);
}

.dueBadge.mid b {
  color: var(--amber);
}

/* The payment code is typed into a plain text box drawn as dots, so password managers leave it alone. */
.pinInput {
  -webkit-text-security: disc;
  text-security: disc;
}
