/* Temanten Photo — STEP 04 Booking (Database Klien) + Jadwal. White + grey. Load after dashboard-v23.css. */

/* ===== Booking: filter chips ===== */
.tbk-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.tbk-chips .ds-chip-btn{display:inline-flex;align-items:center;gap:6px;min-height:38px}
.tbk-cnt{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--ds-grey-100);color:var(--ds-text-2);font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.ds-chip-btn.on .tbk-cnt{background:rgba(255,255,255,.18);color:#fff}
[data-testid=klien-search-input]{background:#fff!important}

/* ===== Booking: table (desktop) ===== */
.tm-shell .tk-wrap{border:1px solid var(--ds-line)!important;border-radius:16px!important;background:#fff!important;box-shadow:var(--ds-sh-1)}
.tm-shell .tk-table{font-family:var(--ds-sans)!important;color:var(--ds-ink)!important;font-size:13.5px!important}
.tm-shell .tk-table th{font-family:var(--ds-sans)!important;font-size:11px!important;font-weight:700!important;letter-spacing:.07em!important;color:var(--ds-mid)!important;background:var(--ds-off)!important;border-bottom:1px solid var(--ds-line)!important;padding:12px 12px!important}
.tm-shell .tk-table td{padding:12px 12px!important;border-bottom:1px solid var(--ds-line-soft)!important}
.tm-shell .tk-table tbody tr:hover td{background:var(--ds-off)!important}
.tm-shell .tk-table tfoot td{background:var(--ds-off)!important;border-top:1px solid var(--ds-line)!important;color:var(--ds-charcoal)}
.tm-shell .tk-sticky,.tm-shell .tk-table td:last-child{background:#fff}
.tm-shell .tk-table th.tk-sticky,.tm-shell .tk-table th:last-child,.tm-shell .tk-table tfoot td:last-child,.tm-shell .tk-table tfoot .tk-sticky{background:var(--ds-off)!important}
.tm-shell .tk-mono,.tm-shell .tk-num{font-family:var(--ds-sans)!important;font-size:13px!important;font-variant-numeric:tabular-nums}
.tm-shell .tk-due{color:var(--ds-yellow-ink)!important;font-weight:600}
.tm-shell .tk-paid{color:var(--ds-mint-ink)!important}
.tm-shell .tk-editing td{background:var(--ds-grey-50)!important}
.tm-shell .tk-chip{border-color:var(--ds-line)!important;color:var(--ds-text-2)!important}
.tm-shell .tk-chip-on{background:var(--ds-charcoal)!important;border-color:var(--ds-charcoal)!important;color:#fff!important}
.tbk-nm{display:block;font-weight:650;color:var(--ds-charcoal)}
.tbk-st{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
.tbk-st .tmd-chip{height:20px;padding:0 8px;font-size:10.5px}
.tk-act{display:table-cell}
.tk-act .btn-icon{width:36px;height:36px}

/* ===== Booking: mobile card list ===== */
@media (max-width:767px){
  .tm-shell .tk-wrap{border:0!important;background:transparent!important;box-shadow:none;overflow:visible!important}
  .tm-shell .tk-table{display:block;min-width:0!important;width:100%}
  .tm-shell .tk-table thead{display:none}
  .tm-shell .tk-table tbody{display:flex;flex-direction:column;gap:10px}
  .tm-shell .tk-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 14px;padding:14px 16px;background:#fff;border:1px solid var(--ds-line);border-radius:14px}
  .tm-shell .tk-table tbody tr.tk-batal{opacity:.7}
  .tm-shell .tk-table tbody tr.tk-batal td{opacity:1}
  .tm-shell .tk-table td{display:block;position:static!important;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important;text-align:left!important;min-width:0!important;max-width:none!important;white-space:normal!important;overflow-wrap:anywhere}
  .tm-shell .tk-table td[data-label]::before{content:attr(data-label);display:block;margin-bottom:2px;font-size:11px;font-weight:600;color:var(--ds-mid)}
  .tm-shell .tk-table .tk-name{grid-column:1/-1;font-size:15px}
  .tm-shell .tk-table .tk-lunas{display:flex;align-items:center;gap:10px}
  .tm-shell .tk-table .tk-lunas::before{margin:0!important}
  .tm-shell .tk-table .tk-cb{width:22px;height:22px}
  .tm-shell .tk-table .tk-act{grid-column:1/-1;display:flex!important;justify-content:flex-end;gap:6px;padding-top:10px!important;border-top:1px solid var(--ds-line-soft)!important}
  .tm-shell .tk-act .btn-icon{width:44px;height:44px;border:1px solid var(--ds-line)!important;border-radius:12px!important}
  /* inline edit / add row becomes a stacked form */
  .tm-shell .tk-table tbody tr.tk-editing{grid-template-columns:minmax(0,1fr);background:var(--ds-grey-50)}
  .tm-shell .tk-editing td{background:transparent!important}
  .tm-shell .tk-editing td::before{display:block;margin-bottom:4px;font-size:11px;font-weight:600;color:var(--ds-mid)}
  .tm-shell .tk-editing td:nth-child(1)::before{content:"Nama klien"}
  .tm-shell .tk-editing td:nth-child(2)::before{content:"Tanggal acara"}
  .tm-shell .tk-editing td:nth-child(3)::before{content:"Kategori"}
  .tm-shell .tk-editing td:nth-child(4)::before{content:"Paket"}
  .tm-shell .tk-editing td:nth-child(5)::before{content:"Team"}
  .tm-shell .tk-editing td:nth-child(6)::before{content:"DP"}
  .tm-shell .tk-editing td:nth-child(7)::before{content:"Harga"}
  .tm-shell .tk-editing td:nth-child(8)::before{content:"Pelunasan"}
  .tm-shell .tk-editing td:nth-child(9)::before{content:"Lunas"}
  .tm-shell .tk-editing .inp,.tm-shell .tk-editing select,.tm-shell .tk-editing input[type=number],.tm-shell .tk-editing input[type=date]{width:100%!important;min-width:0!important;height:44px}
  .tm-shell .tk-editing .tk-team{max-width:none}
  .tm-shell .tk-actions{flex-direction:row;flex-wrap:wrap}
  .tm-shell .tk-actions button{flex:1 1 auto;min-height:44px}
  /* totals */
  .tm-shell .tk-table tfoot{display:block;margin-top:10px}
  .tm-shell .tk-table tfoot tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:14px 16px;background:#fff;border:1px solid var(--ds-line);border-radius:14px}
  .tm-shell .tk-table tfoot td{background:transparent!important;border:0!important}
  .tm-shell .tk-table tfoot td:first-child{grid-column:1/-1;font-weight:700}
  .tm-shell .tk-table tfoot td:nth-child(2),.tm-shell .tk-table tfoot td:nth-child(6){display:none}
  .tm-shell .tk-table tfoot td:nth-child(3)::before{content:"DP"}
  .tm-shell .tk-table tfoot td:nth-child(4)::before{content:"Harga"}
  .tm-shell .tk-table tfoot td:nth-child(5)::before{content:"Pelunasan"}
  .tm-shell .tk-table tfoot td::before{display:block;font-size:11px;font-weight:600;color:var(--ds-mid)}
  .tbk-chips{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:4px}
  .tm-shell .tk-table td.tk-num{display:flex!important;flex-direction:column;align-items:flex-start;gap:6px}
  .tm-shell .tk-editing .tk-chip{min-height:40px;padding:0 14px!important;display:inline-flex;align-items:center}
  .tm-shell .tk-editing [data-testid=klien-edit-package],.tm-shell .tk-editing button{min-height:44px}
  .tm-shell .tk-editing .tk-cb{width:26px;height:26px}
  .tbk-chips .ds-chip-btn{flex:none;min-height:40px}
  .tm-shell [data-testid=klien-year-filter]{flex:1 1 140px}
  .tm-shell [data-testid=klien-download-button]{flex:1 1 140px}
}

/* ===== Jadwal: today + conflicts ===== */
.tjd-top{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 18px;align-items:start}
.tjd-n{min-width:36px;height:36px;padding:0 10px;flex:none;border-radius:12px;background:var(--ds-grey-50);border:1px solid var(--ds-line);color:var(--ds-charcoal);font-weight:700;font-size:16px;display:inline-flex;align-items:center;justify-content:center}
.tjd-n.warn{background:var(--ds-rose);border-color:transparent;color:var(--ds-rose-ink)}
.tjd-row{width:100%;text-align:left;background:transparent;border-left:0;border-right:0;border-bottom:0;cursor:pointer;font-family:var(--ds-sans)}
.tjd-row:hover{background:var(--ds-off)}
.tjd-time{flex:none;min-width:52px;padding:6px 8px;border-radius:10px;background:var(--ds-blue);color:var(--ds-blue-ink);font-size:12.5px;font-weight:700;text-align:center;font-variant-numeric:tabular-nums}
.tjd-conf.has{border-color:#efd6d6}
.tjd-why{color:var(--ds-rose-ink)!important;font-weight:600}
.tjd-cf-l{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0}
.tjd-cf-b{min-height:36px;padding:0 12px;border:1px solid var(--ds-line);border-radius:999px;background:#fff;font:600 12.5px var(--ds-sans);color:var(--ds-ink);cursor:pointer}
.tjd-cf-b:hover{background:var(--ds-grey-50)}
.tm-shell .tj-table .tj-num{min-width:8.5rem!important}

/* ===== Jadwal: toolbar, view toggle, filters ===== */
.tm-shell [data-testid=jadwal-view-toggle]{border-color:var(--ds-line)!important;border-radius:999px!important;background:var(--ds-grey-50)!important;padding:3px!important}
.tm-shell [data-testid=jadwal-view-toggle] button{border-radius:999px!important;min-height:38px}
.tm-shell [data-testid=jadwal-view-toggle] button.bg-zinc-900{background:#fff!important;color:var(--ds-charcoal)!important;box-shadow:0 1px 2px rgba(0,0,0,.08)}

/* ===== Jadwal: calendar ===== */
.tm-shell [data-testid=calendar-view]>div:first-child{border-color:var(--ds-line)!important;border-radius:14px!important}
.tm-shell [data-testid=calendar-month-label]{font-family:var(--ds-serif)!important}
.tm-shell [data-testid=calendar-view] .grid-cols-7{gap:4px}
.tm-shell [data-testid=calendar-view] .grid-cols-7>*{min-width:0;border-radius:10px}
.tm-shell [data-testid=calendar-view] button{transition:background-color .15s,border-color .15s}

/* ===== Jadwal list (inline-edit table) ===== */
.tm-shell .tj-table .tbk-st{margin-top:6px}
.tm-shell .tj-in{border-radius:10px!important}
@media (max-width:767px){
  .tm-shell .tj-table tbody tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .tm-shell .tj-table .tj-in,.tm-shell .tj-table select{width:100%!important;min-width:0!important;height:44px;font-size:16px!important}
  .tm-shell .tj-table td[data-label=Tim],.tm-shell .tj-table td[data-label=Paket]{grid-column:1/-1}
  .tm-shell .tj-table .tk-act>*{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
  .tm-shell .tj-table .tk-act .btn-icon{width:44px;height:44px;border:1px solid var(--ds-line)!important;border-radius:12px!important}
}
.tm-shell [data-testid=calendar-view] .grid-cols-7:first-of-type,.tm-shell [data-testid=calendar-view] [class*=font-mono]{font-family:var(--ds-sans)!important;letter-spacing:.04em}

/* ===== Responsive ===== */
@media (max-width:899px){.tjd-top{grid-template-columns:minmax(0,1fr);gap:12px}}
@media (max-width:767px){
  .tm-shell [data-testid=jadwal-view-toggle]{display:flex!important;width:100%}
  .tm-shell [data-testid=jadwal-view-toggle] button{flex:1;justify-content:center}
  .tm-shell [data-testid=calendar-view] .grid-cols-7{gap:2px}
  .tm-shell [data-testid=calendar-view] .grid-cols-7>*{font-size:12px;padding-left:2px!important;padding-right:2px!important;overflow:hidden}
  .tm-shell [data-testid=calendar-view] .grid-cols-7>* *{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tjd-row .tdx-row-r{display:none}
}
