:root {
  --rs-orange: #d4004c;
  --rs-blue: #0e2d3d;
  --rs-card: #fff;
  --rs-text: #0f172a
}

.rs-archive {
  margin: 1rem 0
}

.rs-filter {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  margin: 16px 0;
  padding: 16px;
  border-radius: 12px;
  background: #f7f7f8
}

.rs-filter label {
  display: block;
  font-weight: 600;
  color: #0a2342;
  margin-bottom: 6px
}

.rs-filter input,
.rs-filter select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff
}

.rs-actions {
  display: flex;
  align-items: center
}

.rs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 400;
  border: 1px solid transparent;
  cursor: pointer;
}

.rs-btn-primary {
  background: var(--rs-orange);
  color: #fff
}

.rs-btn-primary:hover {
  filter: brightness(0.95);
  color: #fff;
}

.rs-btn-outline {
  background: #fff;
  color: var(--rs-orange);
  border-color: var(--rs-orange)
}

.rs-btn-outline:hover {
  background-color: var(--rs-orange);
  color: #fff;
  border-color: var(--rs-orange);
}

.rs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px
}

@media(max-width:1024px) {
  .rs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .rs-filter {
    grid-template-columns: 1fr 1fr;
  }

  .rs-card__title h3 {
    font-size: 18px;
  }

  .rs-btn {
    padding: 7px 14px;
    font-size: 14px;
  }
}

@media(max-width:820px) {
  .rs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .rs-card__header {
    gap: 10px;
    padding: 12px 12px 8px;
  }

  .rs-avatar {
    width: 100px !important;
    height: 56px;
  }

  .rs-card__title h3 {
    font-size: 16px;
  }

  .rs-muted {
    font-size: 12px;
  }

  .rs-card__body {
    padding: 10px 12px;
    min-height: 140px;
  }

  .rs-tab {
    padding: 8px 0;
    font-size: 13px;
  }

  .rs-list {
    font-size: 13px;
    padding-left: 14px;
  }

  .rs-card__footer {
    gap: 8px;
    padding: 10px 12px;
  }

  .rs-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .rs-filter {
    padding: 12px;
    gap: 12px;
  }

  .rs-filter input,
  .rs-filter select {
    padding: 10px 12px;
    font-size: 14px;
  }
}

@media(max-width:640px) {
  .rs-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .rs-filter {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .rs-actions {
    justify-content: flex-start;
  }

  .rs-card__header {
    flex-direction: column;
    text-align: center;
    padding: 14px;
  }

  .rs-avatar {
    width: 80px !important;
    height: 80px !important;
  }

  .rs-card__title h3 {
    font-size: 18px;
  }

  .rs-card__body {
    min-height: auto;
  }

  .rs-tabs {
    gap: 8px;
    flex-direction: column;
  }

  .rs-tab {
    width: 100%;
    text-align: center;
  }

  .rs-card__footer {
    flex-direction: column;
  }

  .rs-btn {
    width: 100%;
    justify-content: center;
  }
}

.rs-card {
  background: var(--rs-card);
  border: 1px solid #eee;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  overflow: hidden;
  display: flex;
  flex-direction: column
}

.rs-card__header {
  display: flex;
  gap: 14px;
  padding: 16px 16px 10px;
  border-bottom: 1px solid #eee;
  align-items: center
}

.rs-avatar {
  width: 130px !important;
  border-radius: 10px !important;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
}

.rs-card__title h3 {
  margin: 0;
  font-size: 20px;
  color: #0f172a
}

.rs-muted {
  color: #6b7280;
  font-size: 14px
}

.rs-card__body {
  padding: 14px 16px;
  min-height: 160px
}

.rs-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee
}

.rs-tab {
  background: none;
  border: 1px solid var(--rs-orange) !important;
  color: var(--rs-orange) !important;
  padding: 10px 0;
  font-weight: 700;
  cursor: pointer;
}

.rs-tab:hover {
  background: var(--rs-orange) !important;
  border: 1px solid var(--rs-orange) !important;
  color: #fff !important;
  cursor: pointer;
}

.rs-tab--active {
  color: var(--rs-orange);
  border-bottom: 2px solid var(--rs-orange)
}

.rs-tabpanel {
  display: none
}

.rs-tabpanel--active {
  display: block
}

.rs-list {
  margin: 0;
  padding-left: 18px;
  /* Limit to 3 lines in archive cards */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em;
  /* 3 lines * 1.5 line-height = 4.5em */
}

.rs-list li {
  margin: 6px 0;
  list-style: none;
}

.rs-card__footer {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #eee
}

.rs-empty {
  padding: 24px;
  text-align: center;
  color: #6b7280
}

/* Single page */
.rs-single {
  max-width: 1250px;
  margin: 30px auto;
  padding: 0 20px
}

.rs-single__wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px
}

@media(max-width:900px) {
  .rs-single__wrap {
    grid-template-columns: 1fr
  }
}

.rs-single__card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  overflow: hidden
}

.rs-single__media {
  padding: 16px;
  text-align: center
}

.rs-single__media img {
  width: 100% !important;
  height: auto !important;
  border-radius: 10px !important;
  object-fit: cover;
}

.rs-single__media h3 {
  font-size: 20px !important;
}

.rs-single__info {
  padding: 16px;
  border-top: 1px solid #eee
}

.rs-single__info h3 {
  margin: 0 0 6px 0
}

.rs-single__btn {
  display: block;
  text-align: center;
  margin: 12px 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--rs-orange);
  color: #fff;
  text-decoration: none;
  font-weight: 400
}

.rs-single__content {
  background: #f7f7f8;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 18px
}

.rs-section {
  margin-bottom: 18px
}

.rs-section h4 {
  margin: 0 0 8px 0;
  color: var(--rs-orange);
  font-size: 22px;
}

.rs-pill {
  background: #eaf2ff;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 6px 0;
  display: inline-block
}

/* ===== Appointment Form (New Modular Architecture) =====  */

/* Modal Overlay & Container */
.rs-appointment-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.rs-appointment-modal-overlay.rs-modal--active {
  display: flex !important;
}

.rs-appointment-modal-container {
  position: relative;
  background: white;
  border-radius: 12px;
  max-width: 650px;
  width: 90%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.rs-appointment-modal-header {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rs-appointment-modal-header h2 {
  margin: 0;
  font-size: 24px;
  color: #111827;
}

.rs-modal__close {
  background: rgb(212 0 76) !important;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 28px;
  color: #ffffff !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.rs-modal__close:hover {
  color: #111827;
}

.rs-appointment-modal-body {
  padding: 24px;
}

/* Inline Form Wrapper */
.rs-appointment-form-inline-wrapper {
  display: block;
  width: 100%;
  max-width: 650px;
  margin: 20px auto;
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Shared Form Styles (used by both modal and inline) */
.rs-modal__close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.rs-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.rs-modal__body {
  padding: 24px;
}

/* Progress Indicator */
.rs-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
}

.rs-progress::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e5e7eb;
  z-index: 0;
}

.rs-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex: 1;
}

.rs-progress__number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
}

.rs-progress__step--active .rs-progress__number {
  background: var(--rs-orange);
  color: #fff;
  box-shadow: 0 4px 12px rgba(212, 0, 76, 0.3);
}

.rs-progress__step--completed .rs-progress__number {
  background: #10b981;
  color: #fff;
}

.rs-progress__label {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  font-weight: 500;
}

.rs-progress__step--active .rs-progress__label {
  color: var(--rs-orange);
  font-weight: 600;
}

/* Form Steps */
.rs-form-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.rs-form-step--active {
  display: block;
}

.rs-form-step__title {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 20px 0;
}

.rs-form-group {
  margin-bottom: 20px;
}

.rs-form-group label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 14px;
}

.rs-required {
  color: var(--rs-orange);
}

.rs-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.rs-input:focus {
  outline: none;
  border-color: var(--rs-orange);
  box-shadow: 0 0 0 3px rgba(212, 0, 76, 0.1);
}

.rs-help-text {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}

/* Shift Selection Cards */
.rs-shift-selection {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.rs-shift-card {
  position: relative;
  cursor: pointer;
}

.rs-shift-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rs-shift-card__content {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s;
  background: #fff;
}

.rs-shift-card:hover .rs-shift-card__content {
  border-color: var(--rs-orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rs-shift-card input:checked+.rs-shift-card__content {
  border-color: var(--rs-orange);
  background: linear-gradient(135deg, rgba(212, 0, 76, 0.05) 0%, rgba(255, 154, 60, 0.05) 100%);
  box-shadow: 0 4px 12px rgba(212, 0, 76, 0.2);
}

.rs-shift-card__icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.rs-shift-card__title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  font-size: 16px;
}

.rs-shift-card__time {
  font-size: 12px;
  color: #6b7280;
}

/* Slot Grid */
.rs-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* Time Slot Buttons */
.rs-slot {
  padding: 12px 8px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  transition: all 0.2s;
  text-align: center;
}

.rs-slot:hover:not(:disabled) {
  border-color: var(--rs-orange);
  background: rgba(212, 0, 76, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rs-slot--selected {
  border-color: var(--rs-orange) !important;
  background: var(--rs-orange) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(212, 0, 76, 0.3) !important;
}

/* Booked/Disabled Slot Styling */
.rs-slot--booked {
  background-color: #f3f4f6 !important;
  color: #9ca3af !important;
  border-color: #e5e7eb !important;
  cursor: not-allowed !important;
  opacity: 0.6;
  position: relative;
}

.rs-slot--booked:hover {
  background-color: #f3f4f6 !important;
  transform: none !important;
  box-shadow: none !important;
  border-color: #e5e7eb !important;
}

/* Optional: Add strikethrough indicator for booked slots */
.rs-slot--booked::after {
  content: '✕';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 10px;
  color: #ef4444;
  font-weight: bold;
}

.rs-slot-btn {
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  transition: all 0.2s;
  text-align: center;
}

.rs-slot-btn:hover:not(:disabled) {
  border-color: var(--rs-orange);
  background: rgba(212, 0, 76, 0.05);
}

.rs-slot-btn.rs-slot-btn--selected {
  border-color: var(--rs-orange);
  background: var(--rs-orange);
  color: #fff;
}

.rs-slot-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Fee Display */
.rs-fee-display {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
}

.rs-fee-display__label {
  font-size: 14px;
  color: #065f46;
  font-weight: 500;
  margin-bottom: 8px;
}

.rs-fee-display__amount {
  font-size: 32px;
  font-weight: 700;
  color: #059669;
}

/* Payment Options */
.rs-payment-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.rs-payment-card {
  position: relative;
  cursor: pointer;
}

.rs-payment-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rs-payment-card__content {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s;
  background: #fff;
}

.rs-payment-card:hover .rs-payment-card__content {
  border-color: var(--rs-orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rs-payment-card input:checked+.rs-payment-card__content {
  border-color: var(--rs-orange);
  background: linear-gradient(135deg, rgba(212, 0, 76, 0.05) 0%, rgba(255, 154, 60, 0.05) 100%);
  box-shadow: 0 4px 12px rgba(212, 0, 76, 0.2);
}

.rs-payment-card__icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.rs-payment-card__title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  font-size: 16px;
}

.rs-payment-card__desc {
  font-size: 12px;
  color: #6b7280;
}

/* Appointment Summary */
.rs-appointment-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.rs-appointment-summary h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.rs-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

.rs-summary-item:last-child {
  border-bottom: none;
}

.rs-summary-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.rs-summary-value {
  font-size: 14px;
  color: #0f172a;
  font-weight: 600;
}

/* Form Navigation */
.rs-form-nav {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.rs-form-nav .rs-btn {
  min-width: 120px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .rs-modal__container {
    width: 95%;
    max-height: 95vh;
  }

  .rs-modal__header {
    padding: 16px 20px;
  }

  .rs-modal__header h2 {
    font-size: 20px;
  }

  .rs-modal__body {
    padding: 20px;
  }

  .rs-progress__label {
    font-size: 10px;
  }

  .rs-progress__number {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .rs-shift-selection {
    grid-template-columns: 1fr;
  }

  .rs-slot-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .rs-payment-options {
    grid-template-columns: 1fr;
  }

  .rs-form-nav {
    flex-direction: column-reverse;
  }

  .rs-form-nav .rs-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .rs-slot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}