/* app.skootly.com/crm: every customer's CRM, on top of /app.css (same cute Skootly look as admin.skootly.com). */
.wrap.wide { width: min(1180px, 100% - 32px); }
.btn.small { width: auto; margin: 0; padding: 8px 14px; font-size: 14px; }
.btn.light { background: var(--card); }
.link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; font: inherit; font-weight: 700; cursor: pointer; }
.muted { color: var(--muted); } .small { font-size: 13.5px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile { background: var(--card); border: 2.5px solid var(--ink); border-radius: 18px; padding: 14px 16px; }
.tile:nth-child(4n+1) { box-shadow: 4px 4px 0 var(--mint); } .tile:nth-child(4n+2) { box-shadow: 4px 4px 0 var(--lav); }
.tile:nth-child(4n+3) { box-shadow: 4px 4px 0 var(--yellow); } .tile:nth-child(4n+4) { box-shadow: 4px 4px 0 var(--peach); }
.tile .num { font: 800 30px/1.1 var(--head); letter-spacing: -.03em; }
.tile .label { color: var(--muted); font-size: 14px; font-weight: 600; }

.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.tab { cursor: pointer; padding: 10px 18px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--card); font: 800 15px var(--head); color: var(--ink); }
.tab.on { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar form { display: flex; gap: 8px; flex: 1; min-width: 220px; max-width: 380px; }
input, select, textarea { font: inherit; padding: 9px 12px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); }
textarea { width: 100%; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); font: 700 13px "DM Sans", system-ui, sans-serif; color: var(--ink); }
.chips button.on { background: var(--ink); color: var(--bg); }

.bulk { display: grid; grid-template-columns: auto minmax(160px, 220px) 1fr auto; gap: 8px; align-items: center; margin-top: 14px; padding: 12px; border: 2.5px dashed var(--ink); border-radius: 16px; background: #fff3c4; }
@media (max-width: 760px) { .bulk { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; margin-top: 14px; border: 2.5px solid var(--ink); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1.5px solid var(--line); font-size: 14px; vertical-align: top; }
th { font-family: var(--head); font-weight: 800; background: var(--peach); white-space: nowrap; }
#leads tr { cursor: pointer; } #leads tr:hover { background: #fff3e6; }
#leads td:first-child { cursor: default; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; }
.stage { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; border: 2px solid var(--ink); white-space: nowrap; }
.stage.new { background: var(--peach); } .stage.dmd { background: var(--lav); } .stage.replied { background: #dbeafe; }
.stage.tapping { background: var(--yellow); } .stage.in { background: var(--mint); } .stage.out { background: #eee; }
.due { margin-left: 4px; font-size: 12px; font-weight: 800; color: var(--warn-fg); }

.add { margin-top: 14px; } .add summary { cursor: pointer; font-weight: 700; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inline-form input { flex: 1; min-width: 200px; }

.plain { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.plain li { padding: 10px 12px; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; font-size: 14px; }
.dms li, .templates li, .launches li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: start; }
.dms .body, .templates .body { grid-column: 1 / -1; white-space: pre-wrap; color: var(--muted); }
.dms .acts, .templates .acts, .launches .acts { display: flex; gap: 8px; }
.status { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 2px solid var(--ink); font-size: 12px; font-weight: 800; }
.status.queued { background: var(--yellow); } .status.sending { background: #dbeafe; } .status.sent { background: var(--mint); }
.status.failed { background: #fecaca; } .status.cancelled { background: #eee; }

.tpl-form { display: grid; gap: 8px; margin-top: 12px; padding: 14px; border: 2.5px dashed var(--ink); border-radius: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row input[type=number] { width: 80px; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 600; }

.drawer { position: fixed; inset: 0; background: rgb(23 21 27 / .35); display: flex; justify-content: flex-end; z-index: 10; }
.drawer-inner { position: relative; width: min(440px, 100%); height: 100%; overflow-y: auto; background: var(--bg); padding: 26px 22px; border-left: 2.5px solid var(--ink); }
.drawer h2 { margin: 6px 40px 6px 0; overflow-wrap: anywhere; }
.drawer h3 { font-family: var(--head); font-size: 15px; margin: 18px 0 8px; }
.drawer input { width: 100%; }
.drawer dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.drawer dt { font-weight: 700; } .drawer dd { margin: 0; overflow-wrap: anywhere; }
.drawer .row { margin-top: 12px; }
.icon-x { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--card); font-weight: 800; cursor: pointer; }

/* 🔗 Sync */
.sync-card h2 { display: flex; align-items: center; gap: 10px; }
.sync-card .status.connected { background: var(--mint); } .sync-card .status.error { background: #fecaca; } .sync-card .status.off { background: #eee; }
.sync-line { font-weight: 700; }
.sync-card code { font-size: 13px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px; padding: 1px 6px; }
.sync-card ol { padding-left: 20px; }

/* 🤝 Team + workspace switcher */
#ws-pick { font: 700 14px var(--head); padding: 6px 10px; border-radius: 999px; }
.team li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.team .role { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; border: 2px solid var(--ink); background: var(--lav); }
.team .role.owner { background: var(--yellow); }

.wb { margin-top: 8px; padding-top: 8px; border-top: 1.5px dashed var(--line); display: grid; gap: 6px; }
.wb-setup summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.wb-setup ol { padding-left: 20px; margin: 8px 0; }

/* 👤 status = WHO they are */
.who { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; border: 2px solid var(--ink); background: #dbeafe; white-space: nowrap; }
.who.client { background: var(--mint); }
#d-statuses button.on { background: #1d4ed8; border-color: #1d4ed8; }
