@layer components {
  /* Mobile Toast Notification */
  .mobile-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: var(--z-modal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 32px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 16px;
    animation: toast-in 0.2s ease-out;
    cursor: pointer;

    &.toast-exit {
      animation: toast-out 0.15s ease-in forwards;
    }
  }

  .mobile-toast-icon {
    color: var(--color-crimson-light);
    display: flex;
    align-items: center;
    justify-content: center;

    svg { width: 48px; height: 48px; }
  }

  .mobile-toast-error .mobile-toast-icon {
    color: var(--color-danger);
  }

  .mobile-toast-text {
    font-size: 15px;
    font-weight: 500;
    color: white;
  }

  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.8);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
  }

  @keyframes toast-out {
    from {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
    to {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.8);
    }
  }

  /* Mobile app body */
  body.mobile-app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    background: var(--color-bg);
  }

  /* Mobile main content area */
  .mobile-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    padding-bottom: var(--nav-bar-height);
    background: var(--color-bg);
    text-align: left;
  }

  /* Bottom Tab Bar */
  .mobile-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--color-bg-white);
    border-top: 1px solid var(--color-border);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: var(--z-nav);

    &.tab-bar-hidden {
      transform: translateY(100%);
      visibility: hidden;
    }
  }

  .tab-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 0;
    text-decoration: none;
    color: var(--color-muted);
    transition: color 0.15s;

    svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
    }

    &:active {
      transform: scale(0.95);
    }

    &.active {
      color: var(--color-primary);
    }
  }

  .tab-bar-icon-wrapper {
    position: relative;
    display: inline-flex;
  }

  .tab-bar-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: var(--color-crimson);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
  }

  .tab-bar-label {
    font-size: 10px;
    font-weight: 500;
  }

  /* Page headers */
  .page-header {
    margin-bottom: 1.5rem;

    h1 {
      font-size: var(--text-x-large);
      font-weight: 600;
      margin: 0;
    }
  }

  /* Date navigation header */
  .date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0 1rem;

    h1 {
      font-size: var(--text-medium);
      font-weight: 500;
      margin: 0;
      text-transform: capitalize;
    }

    .nav-arrow {
      padding: 0.5rem;
      color: var(--color-text);
      border-radius: 8px;

      &:active {
        background: var(--color-bg-hover);
      }
    }
  }

  /* Appointment list */
  .appointment-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Appointment card */
  .appointment-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;

    .time {
      font-size: var(--text-large);
      font-weight: 600;
      min-width: 60px;
    }

    .details {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .customer-name {
      font-weight: 500;
    }

    &.compact {
      padding: 0.75rem 1rem;

      .time {
        font-size: var(--text-normal);
        min-width: auto;
      }
    }
  }

  /* Customer list */
  .customer-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .customer-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;

    .customer-info {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .customer-name {
      font-weight: 500;
    }

    .customer-phone {
      font-size: var(--text-small);
      color: var(--color-muted);
    }
  }

  /* Info rows */
  .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);

    .label {
      color: var(--color-muted);
      font-size: var(--text-small);
    }

    .value {
      font-weight: 500;
    }
  }

  .info-section {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);

    .label {
      color: var(--color-muted);
      font-size: var(--text-small);
      display: block;
      margin-bottom: 0.5rem;
    }

    .services-list {
      list-style: none;
      padding: 0;
      margin: 0;

      li {
        padding: 0.25rem 0;
      }
    }

    .notes {
      margin: 0;
      white-space: pre-wrap;
    }
  }

  /* Floating action button */
  .fab {
    position: fixed;
    bottom: calc(80px + 1rem + env(safe-area-inset-bottom));
    right: 1rem;
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: var(--z-popup);
    text-decoration: none;

    &:active {
      transform: scale(0.95);
    }
  }

  /* Empty state */
  .empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-muted);

    p {
      margin-bottom: 1rem;
    }
  }

  /* Recent appointments in customer detail */
  .recent-appointments {
    margin-top: 2rem;

    h2 {
      font-size: var(--text-medium);
      font-weight: 500;
      margin: 0 0 1rem;
    }
  }

  /* Full width button modifier */
  .btn.full-width {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  /* ============================================
     Mobile Wizard Styles
     ============================================ */

  /* Full-screen wizard container */
  .mobile-wizard {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    z-index: var(--z-page);
  }

  /* Wizard header */
  .mobile-wizard-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 8px var(--content-padding);
    padding-top: calc(8px + env(safe-area-inset-top));

    .wizard_progress {
      flex: 1;
      height: 3px;
    }
  }

  .mobile-wizard-back-form,
  .mobile-wizard-close-form {
    display: flex;
  }

  .mobile-wizard-back,
  .mobile-wizard-close {
    background: none;
    border: none;
    padding: 8px;
    color: var(--color-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
  }

  .mobile-wizard-back {
    margin-left: -16px;

    svg {
      width: 32px;
      height: 32px;
    }
  }

  .mobile-wizard-close {

    svg {
      width: 28px;
      height: 28px;
    }
  }

  /* Wizard content area */
  .mobile-wizard-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Hidden form */
  .mobile-wizard-form {
    display: none;
  }

  /* Loading state */
  .mobile-wizard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 3rem;
  }

  /* Individual wizard step */
  .wizard-step {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    animation: wizard-enter-right 0.25s ease-out;
  }

  .mobile-wizard[data-direction="back"] .wizard-step {
    animation-name: wizard-enter-left;
  }

  @keyframes wizard-enter-right {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
  }

  @keyframes wizard-enter-left {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
  }

  @media (prefers-reduced-motion: reduce) {
    .wizard-step { animation: none; }
  }

  .wizard-step-content {
    flex: 1;
    padding: 4px var(--content-padding) var(--content-padding);
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .wizard-step-title {
    font-size: var(--text-x-large);
    font-weight: 600;
    margin: 0 0 2.5rem;
    color: var(--color-primary);
  }

  .wizard-step-description {
    font-size: var(--text-normal);
    color: var(--color-muted);
    margin: 0 0 1.5rem;
  }

  /* Wizard footer (fixed at bottom) */
  .wizard-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    background: var(--color-bg-white);
    border-top: 1px solid var(--color-border);
    z-index: var(--z-popup);
  }

  /* Choice cards (for customer type, search by, etc.) */
  .wizard-choices {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .wizard-choice-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
    min-height: 72px;

    &:active {
      border-color: var(--color-primary);
      background: rgba(var(--color-primary-rgb), 0.05);
    }
  }

  .wizard-choice-icon,
  .wizard-address-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--color-bg);
    border-radius: 12px;
    color: var(--color-primary);
    flex-shrink: 0;

    svg {
      width: 32px;
      height: 32px;
    }
  }

  .wizard-choice-text {
    flex: 1;

    h3 {
      font-size: var(--text-normal);
      font-weight: 600;
      margin: 0 0 0.25rem;
      color: var(--color-text);
    }

    p {
      font-size: var(--text-small);
      color: var(--color-muted);
      margin: 0;
    }
  }


  .wizard-choice-card.wizard-choice-selected {
    border-color: var(--color-success-dark);
    background: rgba(40, 167, 69, 0.05);
  }

  .wizard-choice-icon-selected {
    background: var(--color-success-dark);
    color: white;
  }

  .wizard-or-divider {
    text-align: center;
    color: var(--color-muted);
    font-size: var(--text-small);
    margin: 0.5rem 0;
  }

  /* Search form */
  .wizard-search-form {
    margin-top: 1rem;
  }

  .wizard-search-input-wrapper {
    position: relative;
  }

  .wizard-search-input {
    width: 100%;
    padding: 1rem;
    font-size: var(--text-large);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg-white);
    color: var(--color-text);

    &:focus {
      outline: none;
      border-color: var(--color-primary);
    }

    &::placeholder {
      color: var(--color-muted);
    }
  }

  /* Customer results list */
  .wizard-customer-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .wizard-customer-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    text-align: left;
    cursor: pointer;

    &:active {
      border-color: var(--color-primary);
    }
  }

  .wizard-customer-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: var(--text-large);
    flex-shrink: 0;
  }

  .wizard-customer-info {
    flex: 1;

    h3 {
      font-size: var(--text-normal);
      font-weight: 600;
      margin: 0;
      color: var(--color-text);
    }

    p {
      font-size: var(--text-small);
      color: var(--color-muted);
      margin: 0.25rem 0 0;
    }
  }

  .wizard-customer-address {
    font-size: var(--text-x-small);
  }

  /* Empty state */
  .wizard-empty-state {
    text-align: center;
    padding: 3rem 1rem;
  }

  .wizard-empty-icon {
    color: var(--color-muted);
    margin-bottom: 1rem;
  }

  /* Form styles */
  .wizard-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .wizard-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    label {
      font-size: var(--text-small);
      font-weight: 500;
      color: var(--color-text);
    }

    .optional {
      font-weight: 400;
      color: var(--color-muted);
    }
  }

  .wizard-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .wizard-form-field-grow {
    grid-column: span 1;
  }

  .wizard-form-field-small {
    max-width: 100px;
  }

  .wizard-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: var(--text-normal);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-white);
    color: var(--color-text);

    &:focus {
      outline: none;
      border-color: var(--color-primary);
    }

    &::placeholder {
      color: var(--color-muted);
    }

    &.error {
      border-color: var(--color-danger);
    }
  }

  /* Address list */
  .wizard-address-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .wizard-address-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    min-height: 72px;

    &:active {
      border-color: var(--color-primary);
    }

    &.wizard-address-new {
      border-style: dashed;
    }
  }


  .wizard-address-info {
    flex: 1;

    h3 {
      font-size: var(--text-normal);
      font-weight: 600;
      margin: 0;
      color: var(--color-text);
    }

    p {
      font-size: var(--text-small);
      color: var(--color-muted);
      margin: 0.25rem 0 0;
    }
  }

  .wizard-address-badge {
    display: inline-block;
    font-size: var(--text-x-small);
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    background: var(--color-primary);
    color: white;
    border-radius: 4px;
    margin-bottom: 0.25rem;

    &.wizard-address-badge-selected {
      background: var(--color-success-dark);
    }
  }

  /* Services list */
  .wizard-services-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .wizard-service-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;

    &.selected,
    &:has(input:checked) {
      border-color: var(--color-primary);
      background: rgba(var(--color-primary-rgb), 0.05);

      .wizard-service-check {
        opacity: 1;
        color: var(--color-primary);
      }
    }
  }

  .wizard-service-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .wizard-service-info {
    flex: 1;
    text-align: left;

    h3 {
      font-size: var(--text-normal);
      font-weight: 600;
      margin: 0;
      color: var(--color-text);
    }
  }

  .wizard-service-description {
    font-size: var(--text-small);
    color: var(--color-muted);
    margin: 0.25rem 0 0;
  }

  .wizard-service-price {
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0.25rem 0 0;
  }

  .wizard-service-check {
    opacity: 0.2;
    color: var(--color-muted);
    transition: opacity 0.15s, color 0.15s;
    flex-shrink: 0;
  }

  .wizard-service-meta {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.25rem;
    font-size: var(--text-small);
    color: var(--color-muted);
  }

  .wizard-service-duration {
    color: var(--color-muted);
  }

  /* Quantity controls for services */
  .wizard-quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .wizard-quantity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    color: var(--color-text);

    &:active {
      background: var(--color-primary);
      border-color: var(--color-primary);
      color: white;
    }

    svg {
      width: 16px;
      height: 16px;
    }
  }

  .wizard-quantity-input {
    width: 40px;
    height: 36px;
    text-align: center;
    font-size: var(--text-normal);
    font-weight: 600;
    background: transparent;
    border: none;
    color: var(--color-text);
    -moz-appearance: textfield;

    &::-webkit-outer-spin-button,
    &::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }
  }

  /* Services subtotal */
  .wizard-services-subtotal {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: var(--text-small);

    &.hidden { display: none; }
  }

  .wizard-services-subtotal-label {
    color: var(--color-muted);
  }

  .wizard-services-subtotal-value {
    font-weight: 600;
    color: var(--color-text);
  }

  /* Date grid */
  .wizard-date-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .wizard-date-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    min-height: 72px;
    transition: border-color 0.15s, background-color 0.15s;

    &:active,
    &.selected {
      border-color: var(--color-primary);
      background: rgba(var(--color-primary-rgb), 0.1);
    }

    &.today {
      border-color: var(--color-primary);
    }
  }

  .wizard-date-weekday {
    font-size: var(--text-x-small);
    font-weight: 500;
    color: var(--color-muted);
    text-transform: uppercase;
  }

  .wizard-date-day {
    font-size: var(--text-x-large);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
  }

  .wizard-date-month {
    font-size: var(--text-x-small);
    color: var(--color-muted);
    text-transform: capitalize;
  }

  .wizard-date-custom {
    margin-top: 1rem;
  }

  .wizard-date-picker {
    &.hidden {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }
  }

  /* Time slots grid */
  .wizard-time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .wizard-time-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-size: var(--text-normal);
    font-weight: 600;
    background: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    min-height: 56px;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;

    &:active,
    &.selected {
      border-color: var(--color-primary);
      background: var(--color-primary);
      color: white;
    }
  }

  /* Review sections */
  .wizard-review-sections {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
  }

  .wizard-review-section {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.25rem 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.15s;
    border-bottom: 1px solid var(--color-border);

    &:last-child {
      border-bottom: none;
    }

    &:active {
      background: var(--color-bg-hover);
    }
  }

  .wizard-review-label {
    grid-column: 1 / -1;
    font-size: var(--text-x-small);
    font-weight: 500;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
  }

  .wizard-review-value {
    grid-column: 1;
    text-align: left;

    strong {
      display: block;
      font-weight: 600;
      color: var(--color-text);
    }

    span {
      font-size: var(--text-small);
      color: var(--color-muted);
    }
  }

  .wizard-review-empty {
    color: var(--color-muted);
    font-style: italic;
  }

  .wizard-review-edit {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    color: var(--color-primary);

    svg {
      width: 20px;
      height: 20px;
    }
  }

  /* Primary and secondary buttons */
  .wizard-primary-btn {
    width: 100%;
    padding: 1rem;
    font-size: var(--text-normal);
    font-weight: 600;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    min-height: 56px;
    transition: opacity 0.15s;

    &:active {
      opacity: 0.9;
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

  }

  .wizard-secondary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    font-size: var(--text-normal);
    font-weight: 500;
    background: var(--color-bg-white);
    color: var(--color-text);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    min-height: 56px;

    &:active {
      background: var(--color-bg-hover);
    }
  }

  /* Slot Picker Styles */
  .slot-recommendations {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .slot-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    text-align: left;
    width: 100%;
    cursor: pointer;
    min-height: 72px;
    transition: border-color 0.15s, background-color 0.15s;

    &:active {
      border-color: var(--color-primary);
      background: rgba(var(--color-primary-rgb), 0.05);
    }
  }

  .slot-card-best {
    border-color: var(--color-success-dark);
    background: rgba(40, 167, 69, 0.05);

    .slot-card-date {
      background: var(--color-success-dark);
      color: white;
    }
  }

  .slot-card-good {
    border-color: var(--color-primary);

    .slot-card-date {
      background: rgba(var(--color-primary-rgb), 0.1);
      color: var(--color-primary);
    }
  }

  .slot-form {
    width: 100%;
  }

  .slot-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 56px;
    padding: 0.5rem;
    background: var(--color-bg-secondary);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    flex-shrink: 0;
  }

  .slot-weekday {
    font-size: var(--text-x-small);
    font-weight: 600;
    text-transform: uppercase;
  }

  .slot-day {
    font-size: var(--text-large);
    font-weight: 700;
    line-height: 1;
  }

  .slot-month {
    font-size: var(--text-x-small);
    text-transform: capitalize;
  }

  .slot-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .slot-time {
    font-size: var(--text-large);
    font-weight: 700;
    color: var(--color-text);
  }

  .slot-reason {
    font-size: var(--text-small);
    color: var(--color-muted);
  }


  /* Weekly Best Section */
  .slot-weekly {
    margin-bottom: 2rem;
  }

  .slot-section-title {
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.75rem;
  }

  .slot-week-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--color-bg-white);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    min-height: 56px;

    &:active {
      border-color: var(--color-primary);
    }
  }

  .slot-week-header {
    font-size: var(--text-small);
    color: var(--color-muted);
  }

  .slot-week-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .slot-week-day {
    font-weight: 600;
    color: var(--color-text);
    text-transform: capitalize;
  }

  .slot-week-time {
    font-size: var(--text-large);
    font-weight: 700;
    color: var(--color-primary);
  }

  /* Quick Jump Section */
  .slot-later {
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
  }

  .slot-quick-jumps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .slot-jump-btn {
    flex: 1;
    min-width: calc(50% - 0.25rem);
    padding: 0.75rem 1rem;
    font-size: var(--text-small);
    font-weight: 500;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    cursor: pointer;
    min-height: 44px;

    &:active {
      background: var(--color-bg-secondary);
      border-color: var(--color-primary);
    }
  }

  .slot-empty {
    text-align: center;
    padding: 2rem;
    background: var(--color-bg);
    border-radius: 12px;
    color: var(--color-muted);
    margin-bottom: 2rem;

    h3 {
      margin: 0 0 0.5rem;
      font-size: var(--text-medium);
      color: var(--color-text);
    }

    p {
      margin: 0;
      font-size: var(--text-small);
    }
  }

  /* Calendar Picker Styles */
  .calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
  }

  .calendar-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--color-text);
    border-radius: 12px;
    cursor: pointer;

    &:active {
      background: var(--color-bg-hover);
    }
  }

  .calendar-month-label {
    font-size: var(--text-large);
    font-weight: 600;
    color: var(--color-text);
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
  }

  .calendar-day-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    font-size: var(--text-x-small);
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
  }

  .calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    font-size: var(--text-normal);
    font-weight: 500;
    background: var(--color-bg-white);
    border: 2px solid transparent;
    border-radius: 50%;
    color: var(--color-text);
    cursor: pointer;
    min-height: 44px;

    &:active:not(.disabled) {
      border-color: var(--color-primary);
      background: rgba(var(--color-primary-rgb), 0.1);
    }

    &.empty {
      background: transparent;
      cursor: default;
    }

    &.today {
      border-color: var(--color-primary);
      color: var(--color-primary);
    }

    &.selected {
      background: var(--color-success-dark);
      border-color: var(--color-success-dark);
      color: white;
    }

    &.disabled {
      color: var(--color-muted);
      opacity: 0.4;
      cursor: not-allowed;
      background: var(--color-bg);
    }
  }

  /* ============================================
     Mobile Components
     ============================================ */

  /* Page Header Bar */
  .page-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px var(--content-padding);
    padding-top: var(--safe-top);

    h1 {
      font-size: 20px;
      font-weight: 600;
      margin: 0;
    }
  }

  .page-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .page-header-action {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-text);
    border-radius: 8px;

    svg {
      width: 22px;
      height: 22px;
    }
  }

  /* Home content */
  .home-content {
    padding-top: var(--safe-top);
  }

  /* Action Items */
  .today-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .action-item {
    border-radius: 12px;
    overflow: hidden;

    &[open] {
      .action-item-chevron svg {
        transform: rotate(180deg);
      }
    }
  }

  .action-item-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    border-radius: 12px;

    &::-webkit-details-marker {
      display: none;
    }

    &::marker {
      display: none;
      content: "";
    }
  }

  .action-item-warning .action-item-summary {
    background: color-mix(in srgb, var(--color-accent-amber) 12%, transparent);
  }

  .action-item-danger .action-item-summary {
    background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  }

  .action-item-icon {
    flex-shrink: 0;

    svg {
      width: 20px;
      height: 20px;
    }
  }

  .action-item-warning .action-item-icon svg {
    stroke: var(--color-accent-amber);
  }

  .action-item-danger .action-item-icon svg {
    stroke: var(--color-danger);
  }

  .action-item-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
  }

  .action-item-chevron {
    flex-shrink: 0;

    svg {
      width: 16px;
      height: 16px;
      stroke: var(--color-muted);
      transition: transform 0.2s;
    }
  }

  .action-item-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px 8px;
  }

  .action-item-card {
    display: block;
    padding: 12px;
    border-radius: 8px;
    background: var(--color-bg-secondary);
    text-decoration: none;
    color: inherit;
    text-align: left;

    &:active {
      opacity: 0.8;
    }
  }

  .action-item-card-time {
    font-size: 12px;
    color: var(--color-muted);
    margin-bottom: 2px;
  }

  .action-item-card-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
  }

  .action-item-card-service {
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 2px;
  }

  /* Today Timeline */
  .today-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
  }

  .timeline-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--color-bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    text-align: left;
    border-left: 3px solid transparent;
    transition: transform 0.15s;

    &:active {
      transform: scale(0.98);
    }
  }

  .timeline-card-next {
    border-left-color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  }

  .timeline-card-done {
    opacity: 0.5;
  }

  .timeline-time {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-crimson-light);
    flex-shrink: 0;
    min-width: 50px;
  }

  .timeline-content {
    flex: 1;
    min-width: 0;
  }

  .timeline-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
  }

  .timeline-service {
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 2px;
  }

  .timeline-badges {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
  }

  .timeline-next-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    align-self: center;
  }

  /* Tomorrow Preview */
  .tomorrow-preview {
    &[open] {
      .tomorrow-chevron svg {
        transform: rotate(180deg);
      }
    }
  }

  .tomorrow-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;

    &::-webkit-details-marker {
      display: none;
    }

    &::marker {
      display: none;
      content: "";
    }
  }

  .tomorrow-summary-content {
    flex: 1;
  }

  .tomorrow-hint {
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 4px;
  }

  .tomorrow-chevron {
    flex-shrink: 0;

    svg {
      width: 16px;
      height: 16px;
      stroke: var(--color-muted);
      transition: transform 0.2s;
    }
  }

  .tomorrow-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
  }

  /* Booking Link Row (compact) */
  .booking-link-row {
    display: flex;
    align-items: center;
    gap: 12px;

    svg {
      width: 18px;
      height: 18px;
      stroke: var(--color-muted);
      flex-shrink: 0;
    }
  }

  .booking-link-row-label {
    flex: 1;
    font-size: 14px;
    color: var(--color-muted);
  }

  .booking-link-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }

  .booking-link-row-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--color-bg-secondary);
    border: none;
    border-radius: 50%;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.15s;

    &:active {
      background: var(--color-bg-tertiary);
    }

    svg {
      width: 16px;
      height: 16px;
      stroke: var(--color-text);
    }

    &.whatsapp svg {
      stroke: none;
    }
  }

  /* Promo Card */
  .promo-card {
    background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-card-alt));
    border-radius: 16px;
    padding: var(--content-padding);
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    text-align: left;

    &::after {
      content: '';
      position: absolute;
      right: -20px;
      bottom: -20px;
      width: 120px;
      height: 120px;
      background: radial-gradient(circle, rgba(var(--color-crimson-rgb), 0.3), transparent);
      border-radius: 50%;
    }
  }

  .promo-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 16px;
    max-width: 70%;
    color: var(--color-text);
  }

  .promo-btn {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;

    &:active {
      background: var(--color-primary-hover);
    }
  }

  /* Booking Link Card */
  .booking-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 8px;
  }

  .booking-link-url {
    flex: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .booking-link-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }


  /* Section */
  .section {
    padding: 24px var(--content-padding);
    border-bottom: 1px solid var(--color-border);

    &:last-child {
      border-bottom: none;
    }
  }

  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
  }

  .section-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
  }

  .section-arrow {
    font-size: 20px;
    color: var(--color-muted);
  }

  .section-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text);
    text-align: left;

    &.success {
      color: var(--color-success-dark);
    }
  }

  /* Alert Card */
  .alert-card {
    background: linear-gradient(135deg, var(--color-crimson-light), var(--color-primary));
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: white;
  }

  .alert-card-icon {
    font-size: 24px;
  }

  .alert-card-content {
    flex: 1;
  }

  .alert-card-title {
    font-size: 14px;
    font-weight: 600;
  }

  .alert-card-subtitle {
    font-size: 12px;
    opacity: 0.9;
  }

  /* Stats Grid */
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
  }

  .stat-card {
    background: var(--color-bg-secondary);
    border-radius: 12px;
    padding: 16px;
    text-align: left;

    &.wide {
      grid-column: span 2;
    }
  }

  .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-crimson-light);

    &.large {
      font-size: 28px;
    }
  }

  .stat-label {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 4px;
  }

  .stat-change {
    font-size: 11px;
    color: var(--color-success-dark);
    margin-top: 4px;

    &.warning { color: var(--color-accent-amber); }
  }

  /* Planning Row (Planning Page) */
  .planning-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-bg-secondary);
    border-radius: 12px;
    margin-top: 16px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    text-align: left;

    &:first-child {
      margin-top: 0;
    }
  }

  .planning-row-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }

  .planning-row-content {
    flex: 1;
  }

  .planning-row-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--color-text);
  }

  .planning-row-subtitle {
    font-size: 12px;
    color: var(--color-muted);
  }

  .planning-row-arrow {
    color: var(--color-muted);
    font-size: 18px;
  }

  /* Feature Cards Row */
  .feature-cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin: 16px calc(-1 * var(--content-padding)) 0;
    padding: 0 var(--content-padding);
    scrollbar-width: none;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  .feature-card {
    min-width: 140px;
    background: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-card-alt));
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.15s;
    text-decoration: none;
    color: inherit;

    &:active {
      transform: scale(0.97);
    }
  }

  .feature-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: auto;
    min-height: 50px;
    color: var(--color-text);
  }

  .feature-card-btn {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 16px;
    text-align: center;
  }

  /* Status Badges */
  .status-badges {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
  }

  .status-badge {
    font-size: var(--text-label);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;

    svg { width: 10px; height: 10px; }
  }

  .status-badge.status-pending   { background: var(--color-state-pending-bg);   color: var(--color-state-pending-text); }
  .status-badge.status-confirmed { background: var(--color-state-confirmed-bg); color: var(--color-state-confirmed-text); }
  .status-badge.status-cancelled,
  .status-badge.status-rejected  { background: var(--color-state-cancelled-bg); color: var(--color-state-cancelled-text); }
  .status-badge.status-completed { background: var(--color-state-completed-bg); color: var(--color-state-completed-text); }

  .status-badge.badge-paid,
  .status-badge.badge-partial      { background: var(--color-success);      color: var(--color-success-text); }
  .status-badge.badge-partial-late { background: var(--color-warning);      color: var(--color-warning-text); }
  .status-badge.badge-late         { background: var(--color-danger-light); color: var(--color-danger-text); }

  /* Appointment Card */
  .appointment-card {
    background: var(--color-bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.15s;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;

    &:active {
      transform: scale(0.98);
    }

    &.completed {
      background: var(--color-bg-tertiary);
      color: var(--color-muted);

      .appointment-time { color: var(--color-muted); }
      .appointment-name { color: var(--color-muted); }
    }
  }

  .appointment-card-content {
    flex: 1;
    min-width: 0;
  }


  .appointment-time {
    font-size: 18px;
    color: var(--color-crimson-light);
    font-weight: 600;
    flex-shrink: 0;
  }

  .appointment-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
  }

  .appointment-badges {
    display: flex;
    gap: 6px;
    margin-top: 4px;
  }

  .appointment-services {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .appointment-service-item {
    font-size: 13px;
    color: var(--color-muted);
  }

  /* Customers Page */
  .mobile-main:has(.customers-page) {
    display: flex;
    flex-direction: column;
  }

  .customers-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;

    .customer-picker-body {
      flex: 1;
      display: flex;
      overflow: hidden;
      position: relative;
    }

    .customer-picker-list {
      padding-bottom: 6rem;
    }

    .customer-picker-card {
      text-decoration: none;
      color: inherit;
    }

    .customer-picker-empty {
      padding-bottom: 6rem;
    }
  }


  /* Mode Tabs (Filter tabs) */
  .mode-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-bg-tertiary);
    padding: 0 var(--content-padding);
  }

  .mode-tab {
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-muted);
    cursor: pointer;
    position: relative;
    background: none;
    border: none;
    text-decoration: none;

    &.active {
      color: var(--color-text);

      &::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--color-primary);
      }
    }
  }


  /* Settings Menu */
  .settings-menu {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
  }

  .settings-group-header {
    font-size: var(--text-small);
    font-weight: 400;
    color: var(--color-muted);
    padding: 24px var(--content-padding) 12px;
  }

  .settings-group-items {
    display: flex;
    flex-direction: column;

    .settings-item + .settings-item {
      border-top: 0.5px solid var(--color-border);
    }
  }

  .settings-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px var(--content-padding);
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;

    &:active {
      background: var(--color-bg-secondary);
    }

    & > svg:first-of-type {
      width: 22px;
      height: 22px;
      stroke-width: 1.5;
      flex-shrink: 0;
    }
  }

  .settings-label {
    flex: 1;
    font-size: var(--text-normal);
    font-weight: 400;
  }

  .settings-chevron {
    color: var(--color-muted);

    svg {
      width: 18px;
      height: 18px;
    }
  }

  .settings-divider {
    border: none;
    border-top: 0.5px solid var(--color-border);
    margin: 0;
  }

  .settings-logout-section {
    margin-top: 24px;
  }

  .settings-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 16px 20px;
    padding: 14px;
    border-radius: 12px;
    background: var(--color-bg-secondary);
    color: var(--color-muted);
    font-size: var(--text-normal);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;

    &:active {
      background: var(--color-bg-tertiary);
    }

    svg {
      width: 20px;
      height: 20px;
      stroke-width: 1.5;
    }
  }

  /* Appointment Detail Page */
  .appointment-info {
    text-align: left;
  }

  .detail-relative-badge {
    color: var(--color-muted);
    font-size: var(--text-xx-small);
    text-transform: lowercase;
  }

  .status-actions {
    padding: 0 var(--content-padding) 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
  }

  .status-actions-message {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-muted);

    svg {
      flex-shrink: 0;
      width: 14px;
      height: 1lh;
    }
  }

  .status-actions-pending .status-actions-message {
    color: var(--color-state-pending-text);
  }

  .status-actions-confirmed .status-actions-message {
    color: var(--color-primary);
  }

  .status-actions-cancelled .status-actions-message,
  .status-actions-rejected .status-actions-message {
    color: var(--color-state-cancelled-text);
  }

  .status-actions-completed .status-actions-message {
    color: var(--color-state-completed-text);

    .status-highlight-warning {
      color: var(--color-warning-text);
    }
  }

  .status-actions-buttons {
    display: flex;
    gap: 8px;

    form { flex: 1; }
    .btn { width: 100%; }
  }

  .status-actions-secondary {
    text-align: left;
  }

  .status-actions-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: var(--color-muted);
    text-decoration: underline;
    cursor: pointer;
    align-self: flex-start;
    margin-left: 20px;
  }

  .info-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 16px var(--content-padding);
    border-bottom: 1px solid var(--color-border);

    &:last-child {
      border-bottom: none;
    }
  }

  .label {
    font-size: 14px;
    color: var(--color-muted);
  }

  .value {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);

    a {
      color: var(--color-primary);
    }
  }

  .info-row-link {
    flex-direction: row;
    align-items: center;
    text-decoration: none;
    color: inherit;

    .label {
      flex-shrink: 0;
      min-width: 60px;
    }

    .value {
      flex: 1;
    }

    svg {
      flex-shrink: 0;
      color: var(--color-muted);
    }
  }

  .services-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;

    td {
      padding: 4px 0;
      font-size: 15px;
      color: var(--color-text);
    }

    .service-name {
      font-weight: 500;
    }

    .service-price {
      text-align: right;
      white-space: nowrap;
      font-family: var(--font-mono);
      font-size: 14px;
    }

    .subtotal-row td {
      padding-top: 8px;
      color: var(--color-muted);
      font-weight: 500;
    }

    .subtotal-row .service-price {
      border-top: 1px solid var(--color-border);
    }

    .payment-status-row td {
      padding-top: 4px;
      font-weight: 400;
    }

    .payment-indicator {
      display: inline-flex;
      align-items: center;
      gap: 3px;
      justify-content: flex-end;

      svg {
        flex-shrink: 0;
        width: 12px;
        height: 12px;
      }
    }

    .payment-paid {
      color: var(--color-success-dark, #28a745);
    }

    .payment-pending {
      color: var(--color-muted);
    }

    .payment-overdue,
    .payment-late {
      color: var(--color-danger);
    }
  }

  .customer-row {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
  }

  .info-row-insight {
    padding: 0 var(--content-padding) 12px;
    margin-top: -8px;
  }

  .customer-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;

    .value {
      font-size: 15px;
      font-weight: 500;
    }

    svg {
      flex-shrink: 0;
      color: var(--color-muted);
    }
  }

  .services-table.compact td {
    font-size: var(--text-small);
  }

  .services-notes {
    color: var(--color-muted);
    font-size: var(--text-x-small);
    margin-top: 4px;
  }

  .payments-table {
    width: 100%;
    border-collapse: collapse;

    td {
      padding: 4px 0;
      font-size: var(--text-small);
      color: var(--color-muted);
    }

    .subtotal-row td {
      padding-top: 8px;
      font-weight: 500;
    }

    .subtotal-row .payment-amount {
      border-top: 1px solid var(--color-border);
    }

    .payment-date {
      white-space: nowrap;
      padding-right: 8px;
    }

    .payment-description {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .payment-edit-btn {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--color-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 48px;
      min-height: 48px;
      margin: -18px -16px;

      svg {
        width: 12px;
        height: 12px;
      }
    }

    .payment-amount {
      text-align: right;
      white-space: nowrap;
      font-family: var(--font-mono);
    }
  }

  .payment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;

    .label {
      margin-right: auto;
    }
  }

  .payment-empty-row {
    display: flex;
    align-items: center;
    gap: 8px;

    .add-payment-btn {
      margin-top: 0;
      align-self: center;
    }
  }

  .payment-empty {
    font-size: 14px;
    color: var(--color-muted);
  }

  .add-payment-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-bg-secondary);
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: var(--text-xx-small);
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    margin-top: 10px;
    align-self: flex-end;

    svg { width: 12px; height: 12px; }
  }

  .address-detail-row {
    display: flex;
    gap: 24px;
  }

  .address-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .address-detail-label {
    font-size: var(--text-xx-small);
    color: var(--color-muted);
  }

  .address-detail-value {
    font-size: var(--text-small);
    color: var(--color-text);
  }

  .inline-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }

  .address-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
  }

  .inline-actions-icons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
  }

  .info-row .circle-action-icon {
    width: 40px;
    height: 40px;
  }

  .timeline-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .timeline-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .timeline-event {
    font-size: var(--text-small);
    font-weight: 500;
    color: var(--color-text);
  }

  .timeline-meta {
    font-size: var(--text-xx-small);
    color: var(--color-muted);
  }

  /* ============================================
     Customer Picker Styles
     ============================================ */

  .customer-picker-step {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  .customer-picker-header {
    padding: 4px var(--content-padding) 0;
    flex-shrink: 0;
  }

  .customer-picker-search {
    padding: 12px var(--content-padding);
    flex-shrink: 0;
  }

  .customer-picker-search-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: var(--color-bg-secondary);
    border-radius: 10px;

    svg {
      color: var(--color-muted);
      flex-shrink: 0;
      width: 16px;
      height: 16px;
    }
  }

  .customer-picker-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-normal);
    color: var(--color-text);
    outline: none;

    &::placeholder {
      color: var(--color-muted);
    }
  }

  .customer-picker-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    color: var(--color-muted);
    cursor: pointer;
    flex-shrink: 0;
  }

  .customer-picker-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
  }

  .customer-picker-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem 4.5rem;
  }

  .customer-picker-loading {
    padding: 3rem;
    text-align: center;
    color: var(--color-muted);
  }

  .customer-picker-group {
    margin-bottom: 0;
  }

  .customer-picker-group-header {
    height: 0;
    overflow: hidden;
  }

  .customer-picker-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    text-align: left;
    cursor: pointer;

    &:active {
      background: var(--color-bg-light);
    }
  }

  .customer-picker-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: var(--text-small);
    flex-shrink: 0;
  }

  .customer-picker-name {
    flex: 1;
    min-width: 0;
    font-size: var(--text-normal);
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .customer-picker-index {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.25rem 0.125rem;
    z-index: var(--z-popup);

    &.hidden {
      display: none;
    }
  }

  .customer-picker-index-letter {
    padding: 0.0625rem 0.25rem;
    font-size: 9px;
    font-weight: 600;
    color: var(--color-primary);
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;

    &:active {
      color: var(--color-text);
    }
  }

  .customer-picker-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;

    &.hidden {
      display: none;
    }

    h3 {
      font-size: var(--text-medium);
      font-weight: 600;
      margin: 0 0 0.5rem;
      color: var(--color-text);
    }

    p {
      font-size: var(--text-small);
      color: var(--color-muted);
      margin: 0 0 1.5rem;
    }

    .wizard-secondary-btn {
      width: auto;
      padding: 0.875rem 1.5rem;
    }
  }

  /* ============================================
     Settings Pages
     ============================================ */

  .mobile-main:has(.settings-hub) {
    padding-bottom: var(--nav-bar-height);
  }

  .settings-hub {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .settings-hub .settings-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .settings-hub .settings-logout {
    margin-top: auto;
  }

  .settings-page {
    padding: 16px var(--content-padding);
  }

  /* Booking Links List */
  .booking-links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .booking-link-item {
    background: var(--color-bg-secondary);
    border-radius: 12px;
    padding: 16px;
  }

  .booking-link-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
  }

  .booking-link-item-info {
    flex: 1;
    min-width: 0;
  }

  .booking-link-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
  }

  .booking-link-item-url {
    font-size: 12px;
    color: var(--color-muted);
    word-break: break-all;
  }

  .booking-link-item-services {
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 4px;
  }

  .booking-link-item-actions {
    display: flex;
    gap: 8px;
  }

  .booking-link-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: var(--color-bg-tertiary);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.15s;

    svg {
      width: 16px;
      height: 16px;
      flex-shrink: 0;
    }

    &:active {
      background: var(--color-bg);
    }

    &.whatsapp {
      background: #25D366;
      color: white;

      &:active {
        background: #1da851;
      }
    }
  }

  /* Toggle Switch */
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
  }

  .toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-tertiary);
    transition: 0.2s;
    border-radius: 28px;

    &::before {
      position: absolute;
      content: "";
      height: 22px;
      width: 22px;
      left: 3px;
      bottom: 3px;
      background: white;
      transition: 0.2s;
      border-radius: 50%;
    }
  }

  .toggle-input:checked + .toggle-slider {
    background: var(--color-success-dark);
  }

  .toggle-input:checked + .toggle-slider::before {
    transform: translateX(20px);
  }

  .empty-hint {
    font-size: 13px;
    color: var(--color-muted);
  }

  /* Services List */
  .services-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--color-bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
  }

  .service-item-info {
    flex: 1;
    min-width: 0;
  }

  .service-item-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
  }

  .service-item-details {
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 2px;
  }

  .service-item-arrow {
    color: var(--color-muted);
    font-size: 18px;
  }

  /* Form Styles */
  .settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    text-align: left;
  }

  .form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);

    &:focus {
      outline: none;
      border-color: var(--color-primary);
    }

    &::placeholder {
      color: var(--color-muted);
    }

    &:disabled,
    &[readonly] {
      opacity: 0.6;
      cursor: not-allowed;
    }
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .form-hint {
    font-size: 12px;
    color: var(--color-muted);
    text-align: left;
  }

  .form-actions {
    margin-top: 8px;
  }

  .verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(var(--color-success-rgb), 0.15);
    color: var(--color-success-text);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
  }

  .form-input.readonly {
    opacity: 0.6;
    cursor: default;
  }

  /* Work Hours — List Row variant (settings page) */
  .work-hours-list {
    .list-row { border-bottom: 0.5px solid var(--color-border); }
  }

  .work-hours-list .list-row-content {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .work-hours-row--disabled .list-row-label {
    color: var(--color-muted);
  }

  /* Work Hours — Day Cards (onboarding) */
  .work-hours-day-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .work-hours-day-card {
    display: flex;
    flex-direction: column;
    padding: 14px;
    background: var(--color-bg-card);
    border-radius: 14px;
    transition: background 0.15s;
  }

  .work-hours-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .work-hours-day-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
  }

  .work-hours-day-disabled {
    background: var(--color-bg-card-alt);

    .work-hours-day-name {
      color: var(--color-muted);
      font-weight: 500;
    }

    .work-hours-day-adjust {
      color: var(--color-muted);
    }
  }

  .work-hours-day-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 13px;
    color: var(--color-muted);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .work-hours-day-expand {
    color: var(--color-muted);
    flex-shrink: 0;

    svg { width: 16px; height: 16px; }
  }

  .work-hours-hint {
    font-size: 13px;
    color: var(--color-muted);
    margin-bottom: 12px;
  }

  /* Work Hours — Drawer Fields */
  .work-hours-drawer-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
  }

  .work-hours-drawer-toggle-label {
    font-size: 15px;
    color: var(--color-text);
  }

  .work-hours-drawer-times {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .work-hours-drawer-time-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;

    .drawer-form-group {
      flex: 1;
      min-width: 0;
      margin-bottom: 0;
    }
  }

  .work-hours-drawer-time-input {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 16px;
    background: var(--color-bg-white);
    color: var(--color-text);

    &:disabled {
      opacity: 0.5;
      background: var(--color-bg);
    }
  }

  .work-hours-drawer-time-separator {
    font-size: 13px;
    color: var(--color-muted);
    flex-shrink: 0;
    padding: 10px 0;
    border: 1px solid transparent;
  }

  .work-hours-drawer-lunch {
    padding-top: 8px;
    padding-bottom: 16px;
  }

  /* Notification Settings */
  .notification-coming-soon {
    opacity: 0.6;
  }


  .toggle-switch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .toggle-switch-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
  }

  .toggle-input-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }

  .toggle-switch-inline {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
  }

  .toggle-switch-inline .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-tertiary);
    transition: 0.2s;
    border-radius: 28px;

    &::before {
      position: absolute;
      content: "";
      height: 22px;
      width: 22px;
      left: 3px;
      bottom: 3px;
      background: white;
      transition: 0.2s;
      border-radius: 50%;
    }
  }

  .toggle-input-hidden:checked + .toggle-switch-inline .toggle-slider {
    background: var(--color-success-dark);
  }

  .toggle-input-hidden:checked + .toggle-switch-inline .toggle-slider::before {
    transform: translateX(20px);
  }

  .toggle-label-text {
    font-size: 15px;
    color: var(--color-text);
  }

  .toggle-switch.toggle-small {
    width: 40px;
    height: 24px;
  }

  .toggle-switch.toggle-small .toggle-slider::before {
    height: 18px;
    width: 18px;
  }

  .toggle-switch.toggle-small .toggle-input:checked + .toggle-slider::before {
    transform: translateX(16px);
  }

  .service-item.inactive {
    opacity: 0.6;
  }

  /* Category Picker */
  .category_picker_selected {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;

    &:active {
      border-color: var(--color-primary);
    }
  }

  .category_picker_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-bg-tertiary);
    border-radius: 10px;
    color: var(--color-primary);
    flex-shrink: 0;
  }

  .category_picker_text {
    flex: 1;
    min-width: 0;
  }

  .category_picker_name {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
  }

  .category_picker_aliases {
    display: block;
    font-size: 12px;
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .category_picker_chevron {
    color: var(--color-muted);
    flex-shrink: 0;
  }

  .category_picker_dropdown {
    margin-top: 4px;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;

    &.hidden {
      display: none;
    }
  }

  .category_picker_option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    text-align: left;
    color: var(--color-primary);

    &:last-child {
      border-bottom: none;
    }

    &:active {
      background: var(--color-bg-hover);
    }
  }

  .category_picker_option_text {
    flex: 1;
    min-width: 0;
  }

  .category_picker_option_name {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
  }

  .category_picker_option_aliases {
    display: block;
    font-size: 12px;
    color: var(--color-muted);
  }

  /* Passkeys Settings */
  .passkeys_section {
    margin-bottom: 24px;
  }

  .passkeys_description {
    font-size: 14px;
    color: var(--color-muted);
    margin-bottom: 16px;
  }

  .passkeys_list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .passkeys_item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--color-bg-secondary);
    border-radius: 12px;
  }

  .passkeys_item_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-bg-tertiary);
    border-radius: 10px;
    color: var(--color-primary);
    flex-shrink: 0;
  }

  .passkeys_item_content {
    flex: 1;
    min-width: 0;
  }

  .passkeys_item_name {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
  }

  .passkeys_item_info {
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 2px;
  }

  .passkeys_item_delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    border-radius: 8px;
    flex-shrink: 0;

    &:active {
      background: var(--color-danger-light);
    }
  }

  .passkeys_empty {
    padding: 24px;
    text-align: center;
    background: var(--color-bg-secondary);
    border-radius: 12px;
    color: var(--color-muted);
  }

  .passkeys_add_section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
  }

  .passkeys_add_title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
  }

  .passkeys_add_form {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .passkeys_nickname_input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);

    &:focus {
      outline: none;
      border-color: var(--color-primary);
    }

    &::placeholder {
      color: var(--color-muted);
    }
  }

  .passkeys_add_button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;

    &:active {
      opacity: 0.9;
    }
  }

  .passkeys_status {
    padding: 12px;
    font-size: 14px;
    color: var(--color-muted);
    text-align: center;

    &.error {
      color: var(--color-danger);
    }
  }

  .passkeys_feedback {
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    background: var(--color-success-light);
    border-left: 3px solid var(--color-success-dark);
    color: var(--color-success-text);
  }

  /* Customer Detail Page */
  .customer-insights {
    padding: 0 var(--content-padding) 12px;
  }

  .customer-info {
    text-align: left;
  }

  .history-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-decoration: none;
    color: var(--color-text);
    font-size: var(--text-small);
    font-weight: 500;

    svg {
      color: var(--color-muted);
      flex-shrink: 0;
    }
  }

  .appointments-section {
    padding: 0 var(--content-padding);
    border-bottom: 1px solid var(--color-border);

    &:last-child {
      border-bottom: none;
    }

    .page-section-label {
      display: block;
      font-size: 14px;
      color: var(--color-muted);
      padding: 16px 0 var(--section-label-gap);
      text-align: left;
    }

    .section-empty {
      display: block;
      font-size: var(--text-x-small);
      color: var(--color-muted);
      text-align: left;
      padding-bottom: 16px;
    }
  }

  .appointments-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 16px;
  }

  .customer-appointment-card {
    background: var(--color-bg-secondary);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 14px;

    &:active { transform: scale(0.98); }

    &.completed {
      background: var(--color-bg-tertiary);
      color: var(--color-muted);

      .card-date, .card-time, .card-summary { color: var(--color-muted); }
    }

    .card-datetime {
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
      min-width: 52px;
    }

    .card-date {
      font-size: var(--text-x-small);
      color: var(--color-muted);
      text-align: left;
    }

    .card-time {
      font-size: var(--text-x-small);
      color: var(--color-text);
    }

    .card-content {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .card-badges {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
    }

    .card-summary {
      font-size: var(--text-x-small);
      color: var(--color-muted);
      text-align: left;
    }


  }

  .pix-action {
    .circle-action-label {
      text-align: center;
    }
  }

  /* Bottom Drawer */
  .bottom-drawer-container {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    pointer-events: none;
    visibility: hidden;

    &.open {
      pointer-events: auto;
      visibility: visible;

      .bottom-drawer-backdrop {
        opacity: 1;
      }

      .bottom-drawer-panel {
        transform: translateY(0);
      }
    }
  }

  .bottom-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease-out;
  }

  .bottom-drawer-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-white);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px var(--content-padding);
    border-bottom: 1px solid var(--color-border);

    h3 {
      font-size: 17px;
      font-weight: 600;
      margin: 0;
    }

    .drawer-close {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--color-muted);
      padding: 4px;
    }

    .drawer-back {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--color-text);
      padding: 4px;
    }
  }

  .drawer-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
  }

  .drawer-step {
    display: none;

    &.active {
      display: block;
    }
  }

  .drawer-step-content {
    padding: var(--content-padding);
  }

  .cancel-drawer-message {
    font-size: 15px;
    color: var(--color-text);
    margin: 0 0 16px;
  }

  .cancel-drawer-reasons {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--color-border);
    border-radius: 12px;
    overflow: hidden;
  }

  .cancel-reason-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    background: var(--color-bg);
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: var(--color-text);

    svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--color-muted); }

    &:active { background: var(--color-bg-hover); }
  }

  .drawer-card-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    transition: background 0.15s;

    &:active {
      background: var(--color-bg-hover);
    }

    & + .drawer-card-button {
      margin-top: 12px;
    }

    svg {
      flex-shrink: 0;
      color: var(--color-muted);
    }
  }

  .drawer-form-group {
    margin-bottom: 16px;

    label {
      display: block;
      font-size: 13px;
      font-weight: 500;
      color: var(--color-muted);
      margin-bottom: 6px;
      text-align: left;
    }

    select,
    input {
      width: 100%;
      padding: 12px;
      border: 1px solid var(--color-border);
      border-radius: 8px;
      font-size: 15px;
      background: var(--color-bg-white);
      color: var(--color-text);

      &:disabled {
        opacity: 0.6;
        background: var(--color-bg);
      }
    }
  }

  .drawer-submit {
    width: 100%;
    margin-top: 8px;
  }

  .drawer-delete {
    width: 100%;
    margin-top: 12px;
  }

  /* Payment Badge */
  .payment-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;

    svg {
      width: 12px;
      height: 12px;
    }

    &.badge-paid,
    &.badge-partial {
      background: var(--color-success);
      color: var(--color-success-text);
    }

    &.badge-partial-late {
      background: var(--color-warning);
      color: var(--color-warning-text);
    }

    &.badge-late {
      background: var(--color-danger-light);
      color: var(--color-danger);
    }
  }


  /* Payment Records */
  .payment-record {
    color: var(--color-muted);
    font-size: 14px;

    .payment-record-info {
      display: flex;
      align-items: center;
      gap: 6px;
      padding-left: 8px;
    }

    .payment-record-method {
      font-weight: 400;
    }

    .payment-edit-btn {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--color-muted);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 48px;
      min-height: 48px;
      margin: -18px -16px;

      svg {
        width: 14px;
        height: 14px;
      }
    }
  }

  .payment-paid-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-x-small);
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--color-success);
    color: var(--color-success-text);
    border: none;
    font-weight: 500;
    opacity: 0.8;
    cursor: default;
  }
}
