.schedule-container {
  padding: 1.5rem 0 2rem;
  width: 100%;
  max-width: 100%;
}

.schedule-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  padding: 0 0.5rem;
}

.schedule-controls__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.schedule-controls__right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.status-filter-btn {
  background: transparent;
  border: 1px solid #3b342c;
  color: #a0978a;
  padding: 0.3rem 0.8rem;
  border-radius: 40px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.status-filter-btn:hover {
  border-color: #f0a868;
  color: #f0a868;
}

.status-filter-btn.active {
  background: #f0a868;
  border-color: #f0a868;
  color: #0b0b0b;
}

.schedule-search {
  position: relative;
  display: flex;
  align-items: center;
}

.schedule-search__input {
  background: #14120f;
  border: 1px solid #2b2620;
  border-radius: 40px;
  padding: 0.4rem 2.2rem 0.4rem 1rem;
  color: #f0ece4;
  font-size: 0.85rem;
  width: 220px;
  transition: border-color 0.2s;
}

.schedule-search__input::placeholder {
  color: #7a7267;
}

.schedule-search__input:focus {
  outline: none;
  border-color: #f0a868;
}

.schedule-search__icon {
  position: absolute;
  right: 0.7rem;
  color: #7a7267;
  pointer-events: none;
}

.view-controls {
  display: flex;
  gap: 0.3rem;
}

.view-btn {
  background: transparent;
  border: 1px solid #3b342c;
  color: #a0978a;
  padding: 0.3rem 0.9rem;
  border-radius: 40px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.view-btn:hover {
  border-color: #f0a868;
  color: #f0a868;
}

.view-btn.active {
  background: #f0a868;
  border-color: #f0a868;
  color: #0b0b0b;
}

.schedule-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.schedule-nav {
  background: transparent;
  border: none;
  color: #9e9487;
  cursor: pointer;
  padding: 0.2rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.schedule-nav:hover {
  color: #f0a868;
}

.schedule-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #f5efe7;
  min-width: 180px;
  text-align: center;
}

.schedule-grid-wrapper {
  overflow-x: auto;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: #1f1b17;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2b2620;
  min-width: 700px;
}

.schedule-grid__header {
  background: #14120f;
  padding: 0.8rem 0.5rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #9e9487;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #2b2620;
}

.schedule-grid__cell {
  background: #13110e;
  min-height: 140px;
  padding: 0.5rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: background 0.15s;
}

.schedule-grid__cell--empty {
  opacity: 0.3;
}

.schedule-grid__cell--today {
  background: rgba(240, 168, 104, 0.05);
  border: 1px solid rgba(240, 168, 104, 0.15);
}

.schedule-grid__cell:hover {
  background: #1a1714;
}

.cell-date {
  font-size: 0.8rem;
  font-weight: 500;
  color: #b0a69a;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid #23201b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cell-date__day {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f5efe7;
}

.cell-date__weekday {
  font-size: 0.7rem;
  color: #7a7267;
  text-transform: lowercase;
}

.order-block {
  border-radius: 6px;
  padding: 0.3rem 0.4rem;
  font-size: 0.7rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border-left: 3px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.3;
  position: relative;
}

.order-block:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.order-block--request {
  background: rgba(230, 81, 0, 0.15);
  border-left-color: #e65100;
}

.order-block--confirmed {
  background: rgba(21, 101, 192, 0.15);
  border-left-color: #1565c0;
}

.order-block--in_progress {
  background: rgba(46, 125, 50, 0.15);
  border-left-color: #2e7d32;
}

.order-block--completed {
  background: rgba(74, 20, 140, 0.15);
  border-left-color: #4a148c;
}

.order-block--paid {
  background: rgba(191, 54, 12, 0.15);
  border-left-color: #bf360c;
}

.order-block__id {
  font-weight: 600;
  color: #f0a868;
  font-size: 0.65rem;
}

.order-block__client {
  color: #ddd4c7;
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-block__address {
  color: #9e9487;
  font-size: 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-block__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.05rem;
}

.order-block__cost {
  color: #f0a868;
  font-size: 0.6rem;
  font-weight: 500;
}

.order-block__status {
  font-size: 0.55rem;
  padding: 0.05rem 0.35rem;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  color: #b0a69a;
}

.order-block__manager {
  color: #7a7267;
  font-size: 0.55rem;
  margin-top: 0.05rem;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #13110e;
  border: 1px solid #2b2620;
  border-radius: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalFade 0.25s ease;
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #2b2620;
}

.modal__title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #f5efe7;
}

.modal__close {
  background: none;
  border: none;
  color: #9e9487;
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 0.25rem;
}

.modal__close:hover {
  color: #f0ece4;
}

.modal__body {
  padding: 1.5rem;
  overflow-y: auto;
}

.order-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.detail-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a7267;
}

.detail-value {
  font-size: 0.95rem;
  color: #f0ece4;
}

.detail-value a {
  color: #f0a868;
  text-decoration: none;
  transition: color 0.2s;
}

.detail-value a:hover {
  color: #ffbe7a;
  text-decoration: underline;
}

.order-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid #23201b;
}

.btn {
  background: #1a1714;
  border: 1px solid #3b342c;
  color: #f0ece4;
  padding: 0.5rem 1.25rem;
  border-radius: 60px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.btn-primary {
  background: #f0a868;
  border-color: #f0a868;
  color: #0b0b0b;
}

.btn-primary:hover {
  background: #ffbe7a;
  border-color: #ffbe7a;
  transform: scale(1.02);
}

.btn-outline {
  background: transparent;
  border-color: #3b342c;
}

.btn-outline:hover {
  border-color: #f0a868;
  color: #f0a868;
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background: #1a1714;
  color: #f0ece4;
  padding: 0.6rem 1.8rem;
  border-radius: 60px;
  border: 1px solid #f0a868;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  pointer-events: auto;
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .schedule-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .schedule-controls__left {
    order: 2;
  }

  .schedule-controls__right {
    order: 1;
    flex-direction: column;
    align-items: stretch;
  }

  .schedule-search__input {
    width: 100%;
  }

  .view-controls {
    justify-content: center;
  }

  .status-filters {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .schedule-grid {
    min-width: 600px;
  }

  .schedule-grid__cell {
    min-height: 100px;
    padding: 0.3rem 0.2rem;
  }

  .cell-date {
    font-size: 0.65rem;
  }
  .cell-date__day {
    font-size: 0.75rem;
  }
  .cell-date__weekday {
    font-size: 0.55rem;
  }

  .order-block {
    font-size: 0.55rem;
    padding: 0.15rem 0.25rem;
  }
  .order-block__id {
    font-size: 0.5rem;
  }
  .order-block__client {
    font-size: 0.5rem;
  }
  .order-block__address {
    font-size: 0.45rem;
  }
  .order-block__cost {
    font-size: 0.45rem;
  }
  .order-block__status {
    font-size: 0.4rem;
    padding: 0.05rem 0.2rem;
  }
  .order-block__manager {
    font-size: 0.4rem;
  }

  .schedule-title {
    font-size: 1.1rem;
    min-width: 120px;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    max-height: 95vh;
    margin: 0.5rem;
  }

  .modal__header {
    padding: 1rem;
  }
  .modal__body {
    padding: 1rem;
  }
}

@media (min-width: 1200px) {
  .schedule-grid__cell {
    min-height: 160px;
    padding: 0.6rem 0.5rem;
  }

  .cell-date {
    font-size: 0.9rem;
  }
  .cell-date__day {
    font-size: 1.05rem;
  }
  .cell-date__weekday {
    font-size: 0.75rem;
  }

  .order-block {
    font-size: 0.75rem;
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
  }
  .order-block__id {
    font-size: 0.7rem;
  }
  .order-block__client {
    font-size: 0.7rem;
  }
  .order-block__address {
    font-size: 0.65rem;
  }
  .order-block__cost {
    font-size: 0.65rem;
  }
  .order-block__status {
    font-size: 0.6rem;
    padding: 0.05rem 0.4rem;
  }
  .order-block__manager {
    font-size: 0.6rem;
  }

  .schedule-grid__header {
    font-size: 1rem;
    padding: 1rem 0.5rem;
  }
}