/* TwinIsles Bookings – front end. Brand colours come from Settings → Branding as CSS variables on .tib */
.tib {
  --tib-primary: #e3001b; --tib-btn-text: #fff; --tib-dark: #111418; --tib-text: #1d2330;
  --tib-light: #f4f5f7; --tib-border: #dde1e7; --tib-font: inherit; --tib-radius: 10px;
  font-family: var(--tib-font); color: var(--tib-text); line-height: 1.5; box-sizing: border-box;
  max-width: 1100px; margin: 0 auto; width: 100%;
}
.tib *, .tib *::before, .tib *::after { box-sizing: border-box; }
.tib a { color: var(--tib-primary); }
.tib-hidden { display: none !important; }
.tib-muted { color: #6b7280; }
.tib-small { font-size: 13px; }
.tib-req { color: var(--tib-primary); }
.tib-h2 { font-size: 26px; line-height: 1.25; margin: 0 0 6px; color: var(--tib-dark); }
.tib-h3 { font-size: 19px; line-height: 1.3; margin: 0 0 14px; color: var(--tib-dark); }
.tib-h4 { font-size: 16px; margin: 0 0 10px; color: var(--tib-dark); }
.tib-loading { padding: 30px; text-align: center; color: #6b7280; }

/* buttons */
.tib-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--tib-primary); color: var(--tib-btn-text) !important; border: 2px solid var(--tib-primary); border-radius: 8px; padding: 11px 20px; font: inherit; font-weight: 700; font-size: 15px; line-height: 1.2; cursor: pointer; text-decoration: none !important; transition: filter .15s, opacity .15s; }
.tib-btn:hover { filter: brightness(.92); }
.tib-btn:disabled { opacity: .55; cursor: not-allowed; }
.tib-btn-ghost { background: transparent; color: var(--tib-primary) !important; }
.tib-btn-danger { background: transparent; color: #b42318 !important; border-color: #f0b8b3; }
.tib-link { background: none; border: 0; padding: 0; color: var(--tib-primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.tib-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }

/* cards + layout */
.tib-card { background: #fff; border: 1px solid var(--tib-border); border-radius: var(--tib-radius); padding: 22px; margin: 0 0 18px; }
.tib-section { margin: 0 0 30px; }
.tib-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.tib-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.tib-row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tib-detail-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 18px; }
.tib-detail-grid > .tib-card { margin: 0; }
.tib-detail-grid + .tib-card { margin-top: 18px; }

/* forms */
.tib-label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 14px; color: var(--tib-dark); }
.tib input[type=text], .tib input[type=email], .tib input[type=tel], .tib input[type=number], .tib input[type=date], .tib input[type=time], .tib input[type=password], .tib select, .tib textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--tib-border); border-radius: 8px; font: inherit; font-size: 15px; font-weight: 400; color: var(--tib-text); background: #fff; min-height: 44px;
}
.tib input:focus, .tib select:focus, .tib textarea:focus { outline: 2px solid var(--tib-primary); outline-offset: 1px; border-color: transparent; }
.tib input[readonly] { background: var(--tib-light); }
.tib-check, .tib-radio { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 0 0 12px; cursor: pointer; }
.tib-check input, .tib-radio input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--tib-primary); flex: none; }
.tib-pay { border: 1px solid var(--tib-border); border-radius: 8px; padding: 12px 16px 2px; margin: 0 0 14px; }
.tib-pay legend { font-weight: 700; padding: 0 6px; }
.tib-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.tib-row { position: relative; padding-right: 34px; }
.tib-row-x { position: absolute; right: 0; top: 30px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--tib-light); color: #6b7280; font-size: 18px; line-height: 1; cursor: pointer; }
.tib-inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--tib-border); }
.tib-inline-form .tib-label { margin: 0; flex: 1 1 180px; }

/* notices + badges */
.tib-notice { padding: 12px 16px; border-radius: 8px; margin: 0 0 16px; font-size: 14px; border-left: 4px solid; }
.tib-notice-ok { background: #ecfdf3; border-color: #12b76a; color: #05603a; }
.tib-notice-error { background: #fef3f2; border-color: #f04438; color: #912018; }
.tib-notice-info { background: var(--tib-light); border-color: var(--tib-dark); }
.tib-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.tib-badge-pending { background: #fff4e5; color: #b54708; }
.tib-badge-booked { background: #e8f1ff; color: #1849a9; }
.tib-badge-complete { background: #ecfdf3; color: #05603a; }
.tib-badge-cancelled { background: #f2f4f7; color: #667085; text-decoration: line-through; }
.tib-tag { display: inline-block; font-size: 11px; background: var(--tib-light); border-radius: 4px; padding: 1px 6px; }

/* definition lists + tables */
.tib-dl { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 8px 14px; margin: 0; font-size: 15px; }
.tib-dl dt { color: #6b7280; margin: 0; }
.tib-dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.tib-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--tib-border); border-radius: var(--tib-radius); background: #fff; }
.tib-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tib-table th, .tib-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--tib-border); vertical-align: top; }
.tib-table th { background: var(--tib-light); font-weight: 700; white-space: nowrap; }
.tib-table tr:last-child td { border-bottom: 0; }
.tib-dayrow td { background: var(--tib-light); font-weight: 700; color: var(--tib-dark); }

/* booking */
.tib-steps-bar { display: flex; list-style: none; padding: 0; margin: 0 0 18px; gap: 6px; counter-reset: s; }
.tib-steps-bar li { flex: 1; font-size: 13px; font-weight: 600; color: #98a2b3; border-top: 4px solid var(--tib-border); padding-top: 8px; counter-increment: s; }
.tib-steps-bar li::before { content: counter(s) '. '; }
.tib-steps-bar li.is-done { color: var(--tib-dark); border-color: var(--tib-dark); }
.tib-steps-bar li.is-cur { color: var(--tib-primary); border-color: var(--tib-primary); }
.tib-summary { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 16px; font-size: 14px; }
.tib-summary:empty { display: none; }
.tib-summary span { color: #6b7280; margin-right: 6px; }
.tib-step { background: #fff; border: 1px solid var(--tib-border); border-radius: var(--tib-radius); padding: 24px; }
.tib-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.tib-choice, .tib-service { text-align: left; background: #fff; border: 2px solid var(--tib-border); border-radius: var(--tib-radius); padding: 16px 18px; font: inherit; color: var(--tib-text); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.tib-choice:hover, .tib-service:hover { border-color: var(--tib-primary); }
.tib-choice.is-sel, .tib-service.is-sel { border-color: var(--tib-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tib-primary) 18%, transparent); }
.tib-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tib-service { display: flex; flex-direction: column; gap: 6px; }
.tib-service-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tib-service-top strong { font-size: 16px; color: var(--tib-dark); }
.tib-price { font-weight: 700; color: var(--tib-primary); white-space: nowrap; }
.tib-service-desc { font-size: 14px; color: #475467; }
.tib-service-meta { font-size: 13px; color: #6b7280; }
.tib-extras-box { margin-top: 20px; }
.tib-extras { display: grid; gap: 8px; }
.tib-extra { display: flex; align-items: center; gap: 10px; border: 1px solid var(--tib-border); border-radius: 8px; padding: 10px 14px; cursor: pointer; font-size: 15px; }
.tib-extra input { width: 18px; height: 18px; accent-color: var(--tib-primary); }
.tib-extra span { flex: 1; }
.tib-dt { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 24px; align-items: start; }
.tib-mp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tib-mp-head button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--tib-border); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--tib-dark); }
.tib-mp-head button:disabled { opacity: .35; cursor: default; }
.tib-mp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; transition: opacity .2s; }
.tib-mp-grid.is-loading { opacity: .4; pointer-events: none; }
.tib-mp-dow { text-align: center; font-size: 12px; font-weight: 700; color: #98a2b3; padding: 4px 0; }
.tib-mp-day { aspect-ratio: 1; min-height: 38px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; color: #c0c5ce; cursor: default; }
.tib-mp-day.is-open { background: var(--tib-light); color: var(--tib-dark); font-weight: 700; cursor: pointer; }
.tib-mp-day.is-open:hover { outline: 2px solid var(--tib-primary); }
.tib-mp-day.is-today { text-decoration: underline; }
.tib-mp-day.is-sel { background: var(--tib-primary); color: var(--tib-btn-text); }
.tib-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tib-slot { border: 2px solid var(--tib-border); background: #fff; border-radius: 8px; padding: 10px 6px; font: inherit; font-weight: 700; font-size: 14px; color: var(--tib-dark); cursor: pointer; }
.tib-slot:hover { border-color: var(--tib-primary); }
.tib-slot.is-sel { background: var(--tib-primary); border-color: var(--tib-primary); color: var(--tib-btn-text); }
.tib-order { background: var(--tib-light); border-radius: 8px; padding: 14px 16px; margin: 4px 0 16px; font-size: 14px; }
.tib-order > div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.tib-order .tib-total { border-top: 1px solid var(--tib-border); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 16px; color: var(--tib-dark); }
.tib-done-head { display: flex; gap: 16px; align-items: center; padding: 20px; border-radius: var(--tib-radius); margin-bottom: 18px; }
.tib-done-head p { margin: 0; }
.tib-done-head.tib-ok { background: #ecfdf3; }
.tib-done-head.tib-pending { background: #fff4e5; }
.tib-done-icon { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 700; color: #fff; background: #12b76a; }
.tib-pending .tib-done-icon { background: #f79009; }

/* portals */
.tib-portal-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.tib-portal-head .tib-actions { margin: 0; }
.tib-portal-head p { margin: 0; }
.tib-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--tib-border); margin: 0 0 20px; -webkit-overflow-scrolling: touch; }
.tib-tab { padding: 10px 14px; font-weight: 600; font-size: 14px; color: #475467 !important; text-decoration: none !important; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tib-tab.is-active { color: var(--tib-primary) !important; border-color: var(--tib-primary); }
.tib-subtabs { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.tib-subtabs a { padding: 6px 14px; border-radius: 999px; background: var(--tib-light); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--tib-dark); }
.tib-subtabs a.is-active { background: var(--tib-dark); color: #fff; }
.tib-visits { list-style: none; margin: 0 0 8px; padding: 0; }
.tib-visits li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--tib-border); font-size: 14px; }
.tib-login { max-width: 460px; margin: 0 auto; }
.tib-login form p { margin: 0 0 12px; }
.tib-login label { font-weight: 600; font-size: 14px; }
.tib-login input[type=submit] { background: var(--tib-primary); color: var(--tib-btn-text); border: 0; border-radius: 8px; padding: 12px 22px; font-weight: 700; cursor: pointer; font-size: 15px; }
.tib-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0 0 20px; }
.tib-stat { background: #fff; border: 1px solid var(--tib-border); border-radius: var(--tib-radius); padding: 14px 16px; }
.tib-stat span { display: block; font-size: 13px; color: #6b7280; }
.tib-stat strong { display: block; font-size: 22px; color: var(--tib-dark); margin-top: 2px; }
.tib-stat em { font-style: normal; font-size: 12px; color: #98a2b3; }

/* hours editor */
.tib-hours { display: grid; gap: 8px; margin: 0 0 16px; }
.tib-hours-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--tib-border); }
.tib-hours-day { width: 130px; margin: 0; font-weight: 700; }
.tib-hours-ranges { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tib-hours-ranges.tib-off { opacity: .35; }
.tib-range { display: inline-flex; align-items: center; gap: 6px; }
.tib .tib-range input[type=time] { width: auto; min-width: 118px; margin: 0; }

/* modal */
.tib-modal { position: fixed; inset: 0; background: rgba(16, 24, 40, .55); z-index: 99999; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; overflow-y: auto; }
.tib-modal-box { position: relative; background: #fff; border-radius: 14px; padding: 26px; width: 100%; max-width: 760px; }
.tib-modal-x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; background: var(--tib-light); border-radius: 50%; font-size: 22px; cursor: pointer; }

/* calendar */
.tib-cal-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.tib-cal-title { font-size: 18px; color: var(--tib-dark); }
.tib-cal-nav, .tib-cal-views { display: flex; gap: 4px; }
.tib-cal-bar button { border: 1px solid var(--tib-border); background: #fff; border-radius: 6px; padding: 7px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--tib-dark); }
.tib-cal-bar button.is-active { background: var(--tib-dark); color: #fff; border-color: var(--tib-dark); }
.tib-cal-body.is-loading { opacity: .45; }
.tib-cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--tib-border); border-left: 1px solid var(--tib-border); }
.tib-cal-dow { padding: 6px; font-size: 12px; font-weight: 700; color: #6b7280; text-align: center; border-right: 1px solid var(--tib-border); border-bottom: 1px solid var(--tib-border); background: var(--tib-light); }
.tib-cal-cell { min-height: 110px; max-height: 190px; overflow-y: auto; padding: 4px; border-right: 1px solid var(--tib-border); border-bottom: 1px solid var(--tib-border); }
.tib-cal-cell.is-out { background: #fafbfc; }
.tib-cal-cell.is-out .tib-cal-num { color: #c0c5ce; }
.tib-cal-cell.is-today .tib-cal-num { background: var(--tib-primary); color: var(--tib-btn-text); }
.tib-cal-num { display: inline-block; min-width: 24px; text-align: center; border-radius: 12px; font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.tib-ev { display: block; font-size: 12px; line-height: 1.3; padding: 3px 5px; margin: 0 0 3px; border-left: 4px solid #64748b; background: var(--tib-light); border-radius: 3px; color: var(--tib-text) !important; text-decoration: none !important; overflow: hidden; }
.tib-ev:hover { filter: brightness(.95); }
.tib-ev-t { font-weight: 700; }
.tib-ev-c { font-weight: 600; }
.tib-ev-s { color: #6b7280; }
.tib-ev-pending { background: repeating-linear-gradient(45deg, #fff8ec, #fff8ec 6px, #fff1d6 6px, #fff1d6 12px); }
.tib-ev-complete { opacity: .7; }
.tib-ev-busy, .tib-ev-off { border-left-color: #94a3b8; background: #eef0f3; color: #6b7280 !important; font-style: italic; }
.tib-cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tib-cal-wday, .tib-cal-lday { background: #fff; border: 1px solid var(--tib-border); border-radius: 8px; padding: 8px; min-height: 120px; }
.tib-cal-wday.is-today { border-color: var(--tib-primary); }
.tib-cal-whead { font-weight: 700; font-size: 13px; color: var(--tib-dark); margin-bottom: 6px; }
.tib-cal-list .tib-cal-lday { min-height: 0; margin-bottom: 10px; }
.tib-cal-list .tib-ev { font-size: 14px; padding: 8px 10px; }
.tib-cal-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; margin: 10px 0 14px; }
.tib-cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* responsive */
@media (max-width: 900px) {
  .tib-detail-grid { grid-template-columns: 1fr; }
  .tib-cal-week { grid-template-columns: 1fr; }
  .tib-cal-wday { min-height: 0; }
  .tib-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .tib-grid2, .tib-grid3 { grid-template-columns: 1fr; }
  .tib-dt { grid-template-columns: 1fr; }
  .tib-step, .tib-card { padding: 16px; }
  .tib-modal-box { padding: 18px; }
  .tib-steps-bar li { font-size: 0; }
  .tib-steps-bar li::before { font-size: 13px; }
  .tib-steps-bar li.is-cur { font-size: 12px; }
  .tib-cal-cell { min-height: 64px; }
  .tib-cal-cell .tib-ev-s, .tib-cal-cell .tib-ev-c { display: none; }
  .tib-dl { grid-template-columns: 1fr; gap: 2px; }
  .tib-dl dd { margin-bottom: 8px; }
  .tib-h2 { font-size: 22px; }
  .tib-actions .tib-btn { flex: 1 1 auto; }
}

.tib-pay .tib-radio > span { display: inline; }
.tib-pay-note { display: block; margin-top: 4px; font-size: 13px; color: var(--tib-muted, #6b7280); white-space: pre-line; }
.tib-offline { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--tib-border, #e5e7eb); border-left: 4px solid var(--tib-primary, #c0392b); border-radius: 8px; background: var(--tib-light, #f8fafc); font-size: 14px; }
.tib-offline strong { display: block; margin-bottom: 4px; }
.tib-offline p { margin: 0; white-space: pre-line; }

.tib-range { flex-wrap: nowrap; }
.tib-del-shift { border: 0; background: transparent; color: var(--tib-muted, #6b7280); font-size: 20px; line-height: 1; padding: 2px 6px; cursor: pointer; border-radius: 4px; }
.tib-del-shift:hover { color: #b91c1c; background: rgba(185, 28, 28, .08); }
.tib-add-shift, .tib-link-btn { border: 0; background: transparent; color: var(--tib-primary); font-weight: 600; cursor: pointer; padding: 4px 0; font-size: 14px; }
.tib-add-shift[disabled] { cursor: default; }
.tib-add-shift[hidden] { display: none; }
@media (max-width: 600px) { .tib-hours-ranges { flex-direction: column; align-items: flex-start; } }

/* Customer portal: upcoming list / calendar */
.tib-up-head { align-items: center; margin-bottom: 8px; }
.tib-up-head .tib-h3 { margin: 0; }
.tib-count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--tib-light); border: 1px solid var(--tib-border); font-size: 13px; font-weight: 600; text-align: center; vertical-align: middle; }
.tib-switch { display: inline-flex; border: 1px solid var(--tib-border); border-radius: 8px; overflow: hidden; }
.tib-switch button { border: 0; background: #fff; padding: 7px 14px; font: inherit; font-size: 14px; cursor: pointer; color: inherit; }
.tib-switch button + button { border-left: 1px solid var(--tib-border); }
.tib-switch button.is-active { background: var(--tib-primary); color: var(--tib-btn-text); }
.tib-up-month { margin: 18px 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
.tib-up-month:first-child { margin-top: 4px; }
.tib-up-item { border: 1px solid var(--tib-border); border-radius: var(--tib-radius); background: #fff; margin-bottom: 8px; }
.tib-up-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: center; padding: 10px 14px; }
.tib-up-when, .tib-up-what { display: flex; flex-direction: column; min-width: 0; }
.tib-up-when span, .tib-up-what span { font-size: 13px; opacity: .75; }
.tib-up-what strong { overflow-wrap: anywhere; }
.tib-up-actions { display: flex; gap: 6px; }
.tib .tib-btn-sm { padding: 6px 12px; font-size: 13px; min-height: 0; }
.tib-up-detail { padding: 4px 14px 14px; border-top: 1px solid var(--tib-border); }
.tib-up-all { margin-top: 6px; }
.tib-plan-facts { margin: 10px 0 6px; padding-left: 18px; font-size: 14px; }
.tib-plan-facts li { margin: 2px 0; }
.tib .tib-ev-move { display: block; width: 100%; text-align: left; font: inherit; font-size: 12px; cursor: pointer; border-top: 0; border-right: 0; border-bottom: 0; }
.tib-cal-list .tib-ev-move { font-size: 14px; }
.tib .tib-ev-move:hover, .tib .tib-ev-move:focus-visible { outline: 2px solid var(--tib-primary); outline-offset: -2px; }
@media (max-width: 640px) {
  .tib-up-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tib-up-what { grid-column: 1 / -1; grid-row: 2; }
  .tib-up-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .tib-up-actions { grid-column: 1 / -1; }
  .tib-up-actions .tib-btn { flex: 1; }
}

/* Home / business choice */
.tib-acct { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.tib-acct legend { font-weight: 700; margin-bottom: 6px; width: 100%; }
.tib-biz { margin-bottom: 4px; }
.tib-acc { margin: 4px 0 12px; }

/* Treatment rows with inventory */
.tib-treat-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 12px; align-items: end; }
.tib-treat-row > .tib-hidden { display: none; }
.tib-unit-wrap { display: flex; align-items: center; gap: 6px; }
.tib-unit-wrap input { flex: 1; min-width: 0; }
.tib-unit { font-size: 13px; opacity: .75; white-space: nowrap; }
@media (max-width: 700px) { .tib-treat-row { grid-template-columns: 1fr; } }

/* User guide */
.tib-guide { max-width: 1180px; margin: 0 auto; }
.tib-guide-tabs { margin-bottom: 18px; }
.tib-guide-intro p { margin: 4px 0 18px; opacity: .85; }
.tib-guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.tib-guide-toc { position: sticky; top: 160px; background: var(--tib-light); border: 1px solid var(--tib-border); border-radius: var(--tib-radius); padding: 14px 16px; font-size: 14px; max-height: calc(100vh - 180px); overflow: auto; }
.tib-guide-toc ol { margin: 8px 0 0; padding-left: 20px; }
.tib-guide-toc li { margin: 5px 0; }
.tib-guide-toc a { color: inherit; text-decoration: none; }
.tib-guide-toc a:hover { color: var(--tib-primary); text-decoration: underline; }
.tib-guide-sec { padding: 6px 0 22px; border-bottom: 1px solid var(--tib-border); margin-bottom: 22px; scroll-margin-top: 160px; }
.tib-guide-sec .tib-h3 { display: flex; align-items: center; gap: 10px; }
.tib-guide-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tib-primary); color: var(--tib-btn-text); font-size: 14px; flex: none; }
.tib-guide-steps { padding-left: 22px; }
.tib-guide-steps li { margin: 6px 0; }
.tib-guide-fig { margin: 16px 0; }
.tib-guide-fig img { display: block; width: 100%; height: auto; border: 1px solid var(--tib-border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.tib-guide-fig figcaption { font-size: 13px; opacity: .75; margin-top: 6px; text-align: center; }
.tib-guide-tip { background: var(--tib-light); border-left: 4px solid var(--tib-primary); border-radius: 6px; padding: 10px 14px; margin: 12px 0; font-size: 14px; }
.tib-guide-pro { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: var(--tib-primary); color: var(--tib-btn-text); vertical-align: middle; line-height: 1.4; }
.tib-guide-toc .tib-guide-pro { font-size: 9px; padding: 1px 5px; margin-left: 4px; }
.tib-guide-pronote { background: #fff7e6; border-left: 4px solid #f0a500; border-radius: 6px; padding: 8px 12px; font-size: 14px; }
.tib-guide-tip ul { margin: 6px 0 0; padding-left: 18px; }
.tib-guide-top { font-size: 13px; text-align: right; margin: 6px 0 0; }
@media (max-width: 900px) { .tib-guide-layout { grid-template-columns: 1fr; } .tib-guide-toc { position: static; max-height: none; } }

/* Tabs wrap on wider screens instead of showing a scrollbar. */
@media (min-width: 700px) { .tib-tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 0; } }
/* Staff menu toggle: only used on phones. */
.tib-menu-cb { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tib-menu-btn { display: none; }
/* Phones: every tab visible at once as a two-column grid of buttons (no sideways swiping); the staff menu collapses behind a Menu bar. */
@media (max-width: 699px) {
  .tib-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow: visible; border-bottom: 0; }
  .tib-tab { display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal; line-height: 1.25; padding: 10px 8px; margin: 0; border: 1px solid var(--tib-border); border-radius: 8px; background: #fff; }
  .tib-tab.is-active { background: var(--tib-primary); border-color: var(--tib-primary); color: #fff !important; }
  .tib-menu-btn { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--tib-border); border-radius: 8px; background: #fff; font-weight: 600; font-size: 15px; color: var(--tib-dark); cursor: pointer; user-select: none; }
  .tib-menu-ico, .tib-menu-ico::before, .tib-menu-ico::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
  .tib-menu-ico { position: relative; flex: none; }
  .tib-menu-ico::before, .tib-menu-ico::after { content: ""; position: absolute; left: 0; }
  .tib-menu-ico::before { top: -6px; }
  .tib-menu-ico::after { top: 6px; }
  .tib-menu-cur { margin-left: auto; color: var(--tib-primary); font-weight: 600; text-align: right; }
  .tib-menu-cur::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .15s; }
  .tib-menu-cb:checked + .tib-menu-btn .tib-menu-cur::after { transform: translateY(1px) rotate(-135deg); }
  .tib-menu-cb:focus-visible + .tib-menu-btn { outline: 2px solid var(--tib-primary); outline-offset: 2px; }
  .tib-tabs-collapse { display: none; }
  .tib-menu-cb:checked ~ .tib-tabs-collapse { display: grid; }
}

.tib-switch{margin:0 0 14px}
.tib-switch .tib-label{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-weight:600}
.tib-switch select{min-width:240px;max-width:100%}
.tib-prod{display:grid;grid-template-columns:1fr auto 72px;gap:12px;align-items:center}
.tib-prod small{display:block;font-weight:400}
.tib-prod input[type=number]{width:72px;padding:8px;border:1px solid var(--tib-border,#d1d5db);border-radius:8px;text-align:center}
@media(max-width:520px){.tib-prod{grid-template-columns:1fr 72px}.tib-prod strong{grid-column:1}}
.tib-prods-form{margin-top:16px;padding-top:14px;border-top:1px solid var(--tib-border,#e5e7eb)}
.tib-prods-form .tib-prod-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0;border-bottom:1px dashed var(--tib-border,#e5e7eb)}
.tib-prods-form .tib-prod-row input{width:72px;padding:8px;border:1px solid var(--tib-border,#d1d5db);border-radius:8px;text-align:center}
.tib-prods-form .tib-prod-row small{display:block}
.tib-extras + .tib-h4{margin-top:22px}
.tib-paused{text-align:center;padding:28px 22px}
.tib-paused .tib-muted{margin-top:14px;font-size:.92em}
/* Block themes (e.g. Twenty Twenty-Five) squeeze shortcodes into a narrow text column; give the portals room. */
.is-layout-constrained > .tib-portal{max-width:min(1180px,100%)!important}

/* Calendar: drag and drop + day view (2.2.0) */
.tib-cal-tip { margin: -6px 0 10px; }
.tib-cal [data-drag] { cursor: grab; }
.tib-cal.is-dragging [data-drag] { cursor: grabbing; }
.tib-cal.is-saving .tib-cal-body { opacity: .6; pointer-events: none; }
.tib-cal .is-drop { background-color: #eef6ff !important; outline: 2px dashed var(--tib-primary); outline-offset: -2px; }
.tib-cal-daylink { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.tib-cal-daylink:hover { text-decoration: underline; color: var(--tib-primary); }
.tib-cal-num .tib-cal-daylink { min-width: 24px; }
.tib-cal-day { overflow-x: auto; border: 1px solid var(--tib-border); border-radius: 8px; background: #fff; }
.tib-day-head, .tib-day-grid { display: grid; grid-template-columns: 64px repeat(var(--tib-day-cols, 1), minmax(150px, 1fr)); min-width: calc(64px + var(--tib-day-cols, 1) * 150px); }
.tib-day-head { position: sticky; top: 0; z-index: 3; background: var(--tib-light); border-bottom: 1px solid var(--tib-border); }
.tib-day-staff { padding: 8px 6px; font-weight: 700; font-size: 13px; text-align: center; border-left: 1px solid var(--tib-border); border-top: 4px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tib-dark); }
.tib-day-gutter { position: relative; }
.tib-day-hour { height: 60px; box-sizing: border-box; padding: 2px 6px 0 0; font-size: 11px; color: #6b7280; text-align: right; border-top: 1px solid #eef0f3; }
.tib-day-col { position: relative; border-left: 1px solid var(--tib-border); background-image: repeating-linear-gradient(to bottom, #eef0f3 0, #eef0f3 1px, transparent 1px, transparent 60px); }
.tib-day-ev { position: absolute; z-index: 2; overflow: hidden; }
.tib-day-ev > .tib-ev { display: block; height: 100%; margin: 0; overflow: hidden; box-sizing: border-box; font-size: 12px; line-height: 1.3; }
.tib-day-block { position: absolute; left: 0; right: 0; z-index: 1; background: repeating-linear-gradient(45deg, #f1f3f6, #f1f3f6 6px, #e7eaee 6px, #e7eaee 12px); color: #6b7280; font-size: 11px; padding: 2px 6px; overflow: hidden; box-sizing: border-box; }
@media (max-width: 700px) { .tib-cal-tip { display: none; } }

/* Service categories + search (2.3.0) */
.tib-svc-search { margin: 0 0 12px; }
.tib-svc-search input[type=search] { width: 100%; box-sizing: border-box; padding: 11px 14px; border: 1px solid var(--tib-border); border-radius: 8px; font: inherit; font-size: 16px; background: #fff; color: var(--tib-text); }
.tib-svc-search input[type=search]:focus { outline: 2px solid var(--tib-primary); outline-offset: 1px; border-color: transparent; }
.tib-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.tib-cat-chip { border: 1px solid var(--tib-border); background: #fff; color: var(--tib-dark); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tib-cat-chip span { font-weight: 400; opacity: .7; margin-left: 2px; }
.tib-cat-chip:hover { border-color: var(--tib-primary); }
.tib-cat-chip.is-on { background: var(--tib-primary); border-color: var(--tib-primary); color: var(--tib-btn-text); }
.tib-cat-desc { margin: -4px 0 12px; font-size: 14px; }
.tib-svc-none { grid-column: 1 / -1; }

.tib-guide-brand { margin: 0 0 14px; }
.tib-guide-brand img { width: 180px; max-width: 50%; height: auto; display: block; }
