.v18-smart-living {
  margin: 22px 0;
  padding: 22px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(22, 91, 76, .15);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0, rgba(87, 211, 168, .2), transparent 36%),
    linear-gradient(135deg, #f5fffb 0%, #f7fbff 58%, #fff 100%);
  box-shadow: 0 18px 45px rgba(9, 40, 67, .08);
}

.v18-smart-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.v18-smart-head h2 { margin: 3px 0 0; font-size: clamp(1.25rem, 3vw, 1.75rem); }
.v18-smart-head p { margin: 0; color: #577081; font-size: .85rem; }

.v18-smart-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(12, 133, 100, .18);
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  color: #087458;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.v18-smart-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #16b782; box-shadow: 0 0 0 5px rgba(22,183,130,.12); }

.v18-smart-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.v18-smart-action {
  min-height: 132px;
  padding: 17px;
  border: 1px solid rgba(20, 58, 82, .09);
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  color: #0a2940;
  text-align: left;
  box-shadow: 0 8px 24px rgba(13, 48, 70, .06);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.v18-smart-action:hover,
.v18-smart-action:focus-visible { transform: translateY(-3px); border-color: rgba(15, 132, 101, .35); box-shadow: 0 14px 30px rgba(13, 48, 70, .12); outline: none; }
.v18-smart-action:active { transform: translateY(-1px) scale(.99); }

.v18-smart-action i {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 14px;
  background: #e5f7ef;
  color: #087458;
  font-style: normal;
  font-weight: 900;
}

.v18-smart-action[data-v18-action="payment"] i { background: #eaf1ff; color: #1a5bc2; }
.v18-smart-action[data-v18-action="appointment"] i { background: #eeeaff; color: #6348c9; }
.v18-smart-action[data-v18-action="draw"] i { background: #fff3da; color: #a56205; }
.v18-smart-action b, .v18-smart-action small { display: block; }
.v18-smart-action b { margin-bottom: 4px; font-size: .96rem; }
.v18-smart-action small { color: #657985; font-size: .76rem; line-height: 1.35; }

@media (max-width: 720px) {
  .v18-smart-living { margin: 16px 0; padding: 17px 14px; border-radius: 22px; }
  .v18-smart-head { align-items: flex-start; margin-bottom: 13px; }
  .v18-smart-head p { display: none; }
  .v18-smart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .v18-smart-action { min-height: 120px; padding: 13px 10px; border-radius: 17px; }
  .v18-smart-action i { width: 38px; height: 38px; margin-bottom: 10px; }
  .v18-smart-action b { font-size: .81rem; }
  .v18-smart-action small { font-size: .67rem; }
}

@media (max-width: 390px) {
  .v18-smart-living { margin-inline: -4px; }
  .v18-smart-action { padding-inline: 8px; }
  .v18-smart-action small { line-height: 1.25; }
}

@media (prefers-reduced-motion: reduce) {
  .v18-smart-action { transition: none; }
}

.facility-v18-summary,
.payment-channel-strip,
.draw-rule-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.facility-v18-summary > div,
.payment-channel-strip > span,
.draw-rule-strip > span,
.facility-rate-strip > span {
  padding: 12px;
  border: 1px solid #dce8ec;
  border-radius: 15px;
  background: #f8fbfc;
}

.facility-v18-summary span,
.payment-channel-strip small,
.draw-rule-strip small,
.facility-rate-strip small { display: block; color: #687d88; font-size: .7rem; }
.facility-v18-summary select,
.facility-v18-summary input { width: 100%; margin-top: 5px; border: 0; background: transparent; color: #0a2940; font-weight: 800; outline: none; }

.facility-rate-strip { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.facility-rate-strip > span { min-width: 120px; flex: 1; }
.facility-rate-strip b,
.payment-channel-strip b,
.draw-rule-strip b { display: block; margin-bottom: 3px; color: #0a2940; }

.facility-slot-wrap { margin: 16px 0; }
.facility-slot-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: #526a78; font-size: .76rem; }
.facility-slot-head b { color: #0a2940; font-size: .85rem; }
.facility-slot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; min-height: 55px; }
.facility-slot {
  padding: 10px 6px;
  border: 1px solid #d9e5e9;
  border-radius: 13px;
  background: #fff;
  color: #183c50;
  cursor: pointer;
}
.facility-slot b,.facility-slot small { display: block; }
.facility-slot b { font-size: .76rem; }
.facility-slot small { margin-top: 2px; color: #15956f; font-size: .62rem; }
.facility-slot:hover:not(:disabled),.facility-slot.selected { border-color: #0a8a68; background: #e9faf4; box-shadow: 0 0 0 2px rgba(10,138,104,.1); }
.facility-slot:disabled { background: #f3f5f6; color: #9ca9ae; cursor: not-allowed; text-decoration: line-through; }
.facility-slot:disabled small { color: #a87575; text-decoration: none; }
.facility-slot-loading,.facility-slot-error { grid-column: 1/-1; padding: 18px; border-radius: 13px; background: #f6f8f9; color: #71838c; text-align: center; font-size: .78rem; }
.facility-slot-error { color: #a43b3b; background: #fff5f5; }

.facility-trust-note,
.payment-trust-note {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #edf8f4;
  color: #45655b;
  font-size: .74rem;
  line-height: 1.45;
}
.facility-trust-note b,.payment-trust-note b { color: #087458; white-space: nowrap; }

.payment-invoice-list .live-row { border: 1px solid #e3ebee; border-radius: 15px; margin-bottom: 8px; padding: 13px; }

.draw-admin-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 14px; padding: 10px 12px; border-radius: 13px; background: #f4f7fb; color: #587080; font-size: .75rem; }
.community-draw-list { display: grid; gap: 12px; }
.community-draw-card { padding: 17px; border: 1px solid #e5e1d5; border-radius: 20px; background: linear-gradient(145deg,#fffdf8,#fff); box-shadow: 0 9px 25px rgba(77,55,11,.07); }
.draw-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.draw-card-top > small,.draw-approval { color: #7f786b; font-size: .68rem; }
.community-draw-card h3 { margin: 13px 0 5px; color: #18364a; font-size: 1.08rem; }
.community-draw-card > p { margin: 0 0 12px; color: #657985; }
.draw-proof { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; margin: 10px 0; border-radius: 11px; background: #f6f4ef; color: #746b59; font-size: .67rem; }
.draw-proof code { color: #8a5d08; }
.draw-entry-confirm { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0; padding: 11px; border-radius: 12px; background: #e9f8f1; color: #087458; font-size: .74rem; }
.draw-entry-confirm span { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; }
.draw-empty { padding: 24px; border: 1px dashed #d9dfe1; border-radius: 18px; text-align: center; color: #687d88; }
.draw-empty i { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 10px; border-radius: 16px; background: #fff3da; color: #a56205; font-style: normal; }
.draw-empty h3 { margin: 0 0 5px; color: #16384d; }
.draw-empty p { margin: 0; font-size: .78rem; }
.draw-history { margin-top: 18px; }
.draw-history h3 { margin-bottom: 8px; font-size: .9rem; }
.draw-history article { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #e8edef; }
.draw-history span b,.draw-history span small { display: block; }
.draw-history span small { color: #71828a; font-size: .68rem; }
.draw-history code { color: #8a5d08; font-size: .68rem; }
.draw-legal-note { background: #fff7e7; color: #735f37; }
.draw-legal-note b { color: #8a5d08; }

@media (max-width: 620px) {
  .facility-v18-summary { grid-template-columns: 1fr 1fr; }
  .facility-v18-summary > div:first-child { grid-column: 1/-1; }
  .payment-channel-strip,.draw-rule-strip { gap: 6px; }
  .payment-channel-strip > span,.draw-rule-strip > span { padding: 9px 7px; }
  .payment-channel-strip b,.draw-rule-strip b { font-size: .75rem; }
  .payment-channel-strip small,.draw-rule-strip small { font-size: .6rem; line-height: 1.25; }
  .facility-slot-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .facility-trust-note,.payment-trust-note { display: block; }
  .facility-trust-note b,.payment-trust-note b { display: block; margin-bottom: 4px; }
  .draw-entry-confirm { display: block; }
  .draw-entry-confirm span { display: block; margin-top: 3px; }
}

.appointment-head { padding-bottom: 4px; }
.appointment-emergency-note,
.appointment-privacy-note,
.appointment-trust-note {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 15px;
  font-size: .73rem;
  line-height: 1.45;
}
.appointment-emergency-note { margin: 10px 0 15px; background: #fff3f1; color: #784a45; }
.appointment-emergency-note b { color: #b03d31; white-space: nowrap; }
.appointment-privacy-note,.appointment-trust-note { margin-top: 15px; background: #f0f7ff; color: #4b6273; }
.appointment-privacy-note b,.appointment-trust-note b { color: #315b86; white-space: nowrap; }

.appointment-resource-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.appointment-resource-grid > button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid #e1e8f0;
  border-radius: 18px;
  background: linear-gradient(145deg,#fff,#fafbff);
  color: #17364c;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.appointment-resource-grid > button:hover,.appointment-resource-grid > button:focus-visible { transform: translateY(-2px); border-color: #8c7add; box-shadow: 0 10px 25px rgba(67,48,130,.11); outline: none; }
.appointment-resource-grid i { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: #eeeaff; color: #6348c9; font-size: .72rem; font-style: normal; font-weight: 900; }
.appointment-resource-grid b,.appointment-resource-grid small { display: block; }
.appointment-resource-grid b { margin-bottom: 4px; font-size: .82rem; }
.appointment-resource-grid small { color: #6b7c88; font-size: .67rem; line-height: 1.35; }
.appointment-resource-grid em { color: #745ed0; font-style: normal; }
.appointment-empty { padding: 26px 18px; border: 1px dashed #d7ddea; border-radius: 18px; background: #fafbfe; text-align: center; color: #687885; }
.appointment-empty i { display: grid; width: 46px; height: 46px; place-items: center; margin: 0 auto 9px; border-radius: 14px; background: #eeeaff; color: #6348c9; font-style: normal; }
.appointment-empty h3 { margin: 0 0 5px; color: #17364c; }
.appointment-empty p { max-width: 440px; margin: auto; font-size: .75rem; }

.appointment-list-section { margin-top: 20px; }
.appointment-list-head h3 { margin: 2px 0 8px; color: #17364c; }
.appointment-list { display: grid; gap: 8px; }
.appointment-list article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid #e4e9ed; border-radius: 16px; background: #fff; }
.appointment-date-tile { display: grid; width: 45px; min-height: 48px; place-items: center; align-content: center; border-radius: 13px; background: #edf7f4; color: #087458; }
.appointment-date-tile b { font-size: 1rem; line-height: 1; }
.appointment-date-tile span { font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.appointment-row-copy { min-width: 0; }
.appointment-row-copy strong,.appointment-row-copy span,.appointment-row-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appointment-row-copy strong { color: #15364a; font-size: .8rem; }
.appointment-row-copy span,.appointment-row-copy small { margin-top: 3px; color: #70818a; font-size: .65rem; }
.appointment-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }

.appointment-book-strip { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 8px; margin: 14px 0; }
.appointment-book-strip > label,.appointment-book-strip > span { padding: 11px 12px; border: 1px solid #e0e7ec; border-radius: 14px; background: #f8fafb; }
.appointment-book-strip span,.appointment-book-strip small,.appointment-book-strip b { display: block; }
.appointment-book-strip span,.appointment-book-strip small { color: #6c7e88; font-size: .65rem; }
.appointment-book-strip b { margin-top: 4px; color: #17364c; font-size: .76rem; }
.appointment-book-strip input { width: 100%; margin-top: 4px; border: 0; background: transparent; color: #17364c; font-weight: 800; outline: none; }
.appointment-slot-wrap { margin: 15px 0; }
.appointment-slot-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; min-height: 52px; }
.appointment-slot { padding: 10px 6px; border: 1px solid #dce3e8; border-radius: 13px; background: #fff; color: #17364c; cursor: pointer; }
.appointment-slot b,.appointment-slot small { display: block; }
.appointment-slot b { font-size: .73rem; }
.appointment-slot small { margin-top: 3px; color: #15956f; font-size: .59rem; }
.appointment-slot.recommended { border-color: #b7abeb; background: #f8f6ff; }
.appointment-slot.recommended small { color: #6348c9; font-weight: 800; }
.appointment-slot:hover,.appointment-slot.selected { border-color: #6b53cc; background: #eeeaff; box-shadow: 0 0 0 2px rgba(107,83,204,.1); }
.appointment-success .big-check { background: #e8f8f1; color: #087458; }
.appointment-setup-panel { margin-top: 22px; padding-top: 5px; border-top: 1px solid #e4e9ed; }
.appointment-setup-list { display: grid; gap: 8px; }
.appointment-setup-list article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 4px; border-bottom: 1px solid #e8edef; }
.appointment-setup-list article > div:first-child { min-width: 0; }
.appointment-setup-list b,.appointment-setup-list span,.appointment-setup-list small { display: block; }
.appointment-setup-list b { color: #17364c; }
.appointment-setup-list span,.appointment-setup-list small { margin-top: 3px; color: #6c7e88; font-size: .7rem; }
.setup-inline-warning { color: #75838a; font-size: .68rem; }
.appointment-day-picker { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 6px; margin-top: 7px; }
.appointment-day-picker label { cursor: pointer; }
.appointment-day-picker input { position: absolute; opacity: 0; pointer-events: none; }
.appointment-day-picker span { display: grid; min-height: 38px; place-items: center; border: 1px solid #dce4e8; border-radius: 11px; background: #fff; color: #60727e; font-size: .69rem; font-weight: 800; }
.appointment-day-picker input:checked + span { border-color: #6b53cc; background: #eeeaff; color: #5b43bd; box-shadow: 0 0 0 2px rgba(107,83,204,.08); }

@media (max-width: 720px) {
  .appointment-resource-grid { grid-template-columns: 1fr; }
  .appointment-resource-grid > button { min-height: 82px; }
  .appointment-list article { grid-template-columns: auto minmax(0,1fr); }
  .appointment-row-actions { grid-column: 1/-1; justify-content: flex-start; padding-left: 56px; }
  .appointment-book-strip { grid-template-columns: 1fr 1fr; }
  .appointment-book-strip > label { grid-column: 1/-1; }
  .appointment-slot-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .appointment-emergency-note,.appointment-privacy-note,.appointment-trust-note { display: block; }
  .appointment-emergency-note b,.appointment-privacy-note b,.appointment-trust-note b { display: block; margin-bottom: 3px; }
  .appointment-day-picker { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .appointment-setup-list article { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 390px) {
  .appointment-slot-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
