/* Tour console — match Workspace / Contact / Signature app shell look */

.futuron-tour-wrap {
  display: grid;
  gap: 16px;
}

/* Outer card styles come from app-shell: .futuron-app-main > .card */

.futuron-tour-wrap .futuron-app-page-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #0f1b38;
  line-height: 1.2;
}

/* Header: title + settings gear (Workspace-style) */
.fta-page-head .fta-head-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  width:100%;
}
.fta-head-meta{flex:1 1 auto;min-width:0}
.fta-head-meta .futuron-app-tab-desc{margin:6px 0 0}
.fta-head-tools{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
  margin-left:auto;
}
.fta-tool{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:999px;
  border:1px solid #c5d8e6;
  background:#fff;
  color:#1f4d73;
  text-decoration:none;
  box-sizing:border-box;
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease;
}
.fta-tool:hover{
  background:#eef6fb;
  border-color:#1f4d73;
  color:#0f1b38;
}
.fta-tool.is-active{
  border-color:#1f4d73;
  background:#e8f2fa;
  color:#0f1b38;
  box-shadow:0 0 0 2px rgba(31,77,115,.12);
}
.fta-tool-icon{display:block;flex-shrink:0}
.fta-settings-back-wrap{margin:10px 0 0}
.fta-settings-back{
  display:inline-flex;
  font-size:13px;
  font-weight:700;
  color:#1f4d73;
  text-decoration:none;
}
.fta-settings-back:hover{color:#0f1b38;text-decoration:underline}

/* Company calendar (admin settings) */
.fta-company-block{margin-top:16px}
.fta-company-block:first-of-type{margin-top:4px}
.fta-company-title{
  margin:0 0 10px;
  font-size:15px;
  font-weight:800;
  color:#0f1b38;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.fta-company-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  background:#e8f2fa;
  color:#1f4d73;
  font-size:12px;
  font-weight:800;
}
.fta-company-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
}
.fta-company-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#f8fafc;
}
.fta-company-main{
  display:grid;
  gap:3px;
  min-width:0;
}
.fta-company-client{font-size:14px;color:#0f1b38}
.fta-company-slot{font-size:13px;font-weight:700;color:#2f7a8a}
.fta-company-host{font-size:12px;color:#64748b}
@media (max-width:480px){
  .fta-tool{width:34px;height:34px}
  .fta-company-row{flex-direction:column;align-items:stretch}
}

/* Tabs scroll on narrow screens (same family as shared tabs) */
.futuron-tour-wrap .futuron-app-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}
.futuron-tour-wrap .futuron-app-tabs::-webkit-scrollbar {
  display: none;
}
.futuron-tour-wrap .futuron-app-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Brand buttons (not WP admin .button) */
.fta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid #d7e2ea;
  background: #fff;
  color: #1f4d73;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.fta-btn:hover,
.fta-btn:focus {
  border-color: #2f7a8a;
  color: #0f1b38;
  outline: none;
}
.fta-btn--primary {
  background: linear-gradient(180deg, #0f1b38, #1f4d73);
  border-color: transparent;
  color: #fff !important;
}
.fta-btn--primary:hover,
.fta-btn--primary:focus {
  color: #fff !important;
  filter: brightness(1.05);
}
.fta-btn--wa {
  background: #25d366;
  border-color: #1ebe57;
  color: #fff !important;
}
.fta-btn--wa:hover,
.fta-btn--wa:focus {
  color: #fff !important;
  filter: brightness(1.04);
}
.fta-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Chip filters (like workspace activity filters) */
.fta-chip-filter,
.fta-filters .fta-filter,
.fta-filters .fta-lead-filter {
  border: 1px solid #d7e2ea;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #1f4d73;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.fta-chip-filter.is-active,
.fta-filter.is-active,
.fta-lead-filter.is-active {
  background: #2f7a8a;
  border-color: #2f7a8a;
  color: #fff;
}

/* Stats — same spirit as AI stats bar */
.fta-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.fta-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-inline-start: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: #0f1b38;
  vertical-align: middle;
}
.futuron-app-tab.has-badge {
  font-weight: 800;
}
.fta-stat.is-alert {
  border-color: #e8b86d;
  background: linear-gradient(145deg, #fff9f0, #fff);
  box-shadow: 0 0 0 1px rgba(153, 104, 0, 0.12);
}
.fta-stat.is-alert strong {
  color: #996800;
}
.fta-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 12px;
  background: #f6fbff;
  border: 1px solid #e4ebf1;
  text-align: center;
  min-width: 0;
}
.fta-stat strong {
  font-size: 1.15rem;
  color: #0f1b38;
  line-height: 1.2;
}
.fta-stat span {
  font-size: 10px;
  font-weight: 700;
  color: #6b7a8b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* Content panels inside the main card */
.fta-card {
  background: #f8fbfd;
  border: 1px solid #d7e2ea;
  border-radius: 14px;
  padding: 16px;
  margin: 0;
  box-shadow: none;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
.fta-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: #0f1b38;
}
.fta-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.fta-card-head h2 {
  margin: 0;
}
.fta-card .description,
.fta-card p.description {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7a8b;
}

.fta-schedule-form,
.fta-templates-form {
  display: grid;
  gap: 12px;
  max-width: 640px;
}
.fta-schedule-form label,
.fta-templates-form label {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}
.fta-schedule-form input,
.fta-schedule-form select,
.fta-schedule-form textarea,
.fta-templates-form textarea,
.fta-ai-brief-body input,
.fta-ai-brief-body textarea {
  width: 100%;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid #d7e2ea;
  border-radius: 10px;
  font: inherit;
  box-sizing: border-box;
  background: #fff;
}
.fta-divider {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 18px 0 14px;
}
.fta-field {
  display: grid;
  gap: 6px;
}
.fta-field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}
.fta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fta-chip-btn {
  border: 1px solid #d7e2ea;
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #1f4d73;
  cursor: pointer;
  font-family: inherit;
}
.fta-chip-btn.is-active {
  background: #0f1b38 !important;
  color: #fff !important;
  border-color: #0f1b38 !important;
}
.fta-ai-inline {
  margin: 4px 0;
}
.fta-invite-result {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.fta-invite-result h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #0f1b38;
}

.fta-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  max-width: 100%;
  min-width: 0;
}
.fta-link-input {
  flex: 1 1 160px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid #d7e2ea;
  border-radius: 10px;
  font-size: 13px;
  box-sizing: border-box;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fta-qr-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.fta-qr-wrap img {
  border: 1px solid #e4ebf1;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
}

.fta-availability {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}
.fta-day {
  display: grid;
  grid-template-columns: minmax(110px, 1.2fr) 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}
.fta-day-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
}
.fta-day input[type='time'] {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid #d7e2ea;
  border-radius: 10px;
  background: #fff;
}
.fta-day-sep {
  color: #94a3b8;
  text-align: center;
}
.fta-msg {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #15803d;
}
.fta-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fta-bookings {
  display: grid;
  gap: 10px;
}
.fta-empty {
  margin: 0;
  color: #64748b;
  padding: 12px 0;
  font-size: 14px;
}
.fta-booking {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e4ebf1;
  border-radius: 14px;
  background: #fff;
}
.fta-booking-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 200px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fta-booking-main strong {
  font-size: 0.98rem;
  color: #0f1b38;
}
.fta-phone,
.fta-slot {
  color: #475569;
  font-size: 0.88rem;
}
.fta-notes {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.86rem;
}
.fta-booking-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.fta-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.fta-status--pending,
.fta-status--sent {
  background: #e0f2fe;
  color: #075985;
}
.fta-status--accepted,
.fta-status--completed {
  background: #dcfce7;
  color: #166534;
}
.fta-status--rejected,
.fta-status--expired,
.fta-status--cancelled {
  background: #fee2e2;
  color: #991b1b;
}
.fta-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.fta-ai-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e8f4f6;
  color: #0e1c3b;
  border: 1px solid #56a9b5;
}
.fta-ai-brief {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfe3e8;
  background: #f4fafb;
}
.fta-ai-brief summary {
  cursor: pointer;
  font-weight: 700;
  color: #0e1c3b;
  font-size: 0.9rem;
}
.fta-ai-brief-body {
  margin-top: 8px;
  font-size: 0.86rem;
  color: #334155;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fta-ai-brief-body p {
  margin: 0 0 6px;
}
.fta-ai-brief-body ul,
.fta-ai-brief-body ol {
  margin: 4px 0 8px;
  padding-left: 18px;
}
.fta-ai-brief-body a {
  word-break: break-all;
}
.fta-ai-station-list {
  margin: 8px 0 10px;
}
.fta-ai-station-list li {
  margin-bottom: 6px;
}
.fta-ai-why {
  color: #64748b;
  font-size: 0.84rem;
}
.fta-booking.has-ai {
  border-color: #9ec9d1;
}
.fta-no-ai {
  opacity: 0.75;
  font-style: italic;
}
.fta-ai-toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #cfe3e8;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.fta-ai-toggle input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: #2f7a8a;
}
.fta-ai-toggle strong {
  display: block;
  font-size: 0.95rem;
  color: #0e1c3b;
}
.fta-ai-toggle small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .fta-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fta-day {
    grid-template-columns: 1fr 1fr;
  }
  .fta-day-toggle {
    grid-column: 1 / -1;
  }
  .fta-day-sep {
    display: none;
  }
  .fta-link-row .fta-btn {
    flex: 1 1 auto;
  }
  .fta-card {
    padding: 12px;
  }
  .futuron-tour-wrap .futuron-app-page-head h1 {
    font-size: 22px;
  }
}

.futuron-app-shell .futuron-emp-nav--bottom {
  z-index: 120;
}
.futuron-app-shell .futuron-tour-wrap.card {
  margin-bottom: 8px;
}

/* Validity settings */
.fta-expiry-form {
  display: grid;
  gap: 16px;
  max-width: 640px;
}
.fta-expiry-block {
  margin: 0;
  padding: 14px;
  border: 1px solid #d7e2ea;
  border-radius: 12px;
  background: #fff;
  display: grid;
  gap: 12px;
}
.fta-expiry-block legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #0f1b38;
}
.fta-expiry-days-wrap {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}
.fta-expiry-days-wrap input[type='number'] {
  width: 120px;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid #d7e2ea;
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.fta-expiry-days-wrap .description {
  font-weight: 500;
  font-size: 12px;
  color: #6b7a8b;
}

/* �� Unified tour manage panel �� */
.fta-source-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5b6b7c;
  background: #eef3f7;
  border-radius: 999px;
  padding: 2px 8px;
  margin: 2px 0 4px;
  width: fit-content;
}
.fta-manage {
  margin-top: 10px;
  border: 1px solid #d7e2ea;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}
.fta-manage > summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  color: #0f1b38;
  padding: 10px 12px;
  list-style: none;
}
.fta-manage > summary::-webkit-details-marker { display: none; }
.fta-manage-body {
  padding: 0 12px 12px;
  display: grid;
  gap: 10px;
}
.fta-manage-body label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.fta-manage-body input,
.fta-manage-body textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7e2ea;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.fta-reschedule-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px dashed #c5d4e0;
}
.fta-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fta-actions--danger {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}
.fta-btn--danger {
  color: #b91c1c !important;
  border-color: #fecaca !important;
  background: #fef2f2 !important;
}
.fta-tour-card.is-past {
  opacity: 0.92;
}
.fta-notes-locked {
  color: #64748b;
  font-style: italic;
}
.fta-status--completed { background: #dcfce7; color: #166534; }
.fta-status--cancelled { background: #fee2e2; color: #991b1b; }

/* �� Lifecycle badges (public + private) �� */
.fta-status--action {
  background: #fff7ed !important;
  color: #c2410c !important;
  border: 1px solid #fdba74;
  font-weight: 800;
}
.fta-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #9a3412;
  background: linear-gradient(135deg, #ffedd5, #fed7aa);
  border: 1px solid #fb923c;
  animation: fta-pulse-soft 2.2s ease-in-out infinite;
}
.fta-action-callout {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.4;
}
.fta-conflict-callout,
.fta-conflict-banner {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.4;
  margin: 6px 0 0;
}
.fta-tour-card.needs-action {
  border-color: #fb923c;
  box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.25);
}
.fta-tour-card.has-conflict {
  border-color: #f87171;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.22);
}
.fta-actions--complete {
  margin-top: 8px;
}
.fta-status--accepted { background: #dbeafe; color: #1d4ed8; }
.fta-status--pending,
.fta-status--sent { background: #fef9c3; color: #854d0e; }
.fta-status--rejected,
.fta-status--expired { background: #f1f5f9; color: #475569; }
@keyframes fta-pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}
