* {
  box-sizing: border-box;
}

:root {
  --minion-yellow: #f8d848;
  --minion-yellow-soft: #ffe889;
  --minion-blue: #2f5b89;
  --minion-blue-dark: #214162;
  --minion-bg: #f6f7fb;
  --minion-text: #1f2933;
  --minion-muted: #52606d;
  --minion-card: #ffffff;
  --minion-shadow: 0 12px 30px rgba(25, 43, 66, 0.12);
  --minion-shadow-soft: 0 8px 20px rgba(25, 43, 66, 0.08);
  --minion-bg-image: url("/assets/images/image.png");
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--minion-bg);
  color: var(--minion-text);
  min-height: 100vh;
}

.minion-theme {
  background-image:
    linear-gradient(180deg, rgba(246, 247, 251, 0.35) 0%, rgba(246, 247, 251, 0.25) 50%, rgba(246, 247, 251, 0.35) 100%),
    var(--minion-bg-image),
    radial-gradient(circle at 10% 20%, rgba(248, 216, 72, 0.1), transparent 35%),
    radial-gradient(circle at 90% 0%, rgba(47, 91, 137, 0.08), transparent 40%),
    radial-gradient(circle at 30% 80%, rgba(248, 216, 72, 0.08), transparent 45%);
  background-size: 100% 100%, clamp(280px, 85vw, 720px) auto, auto, auto, auto;
  background-position: center, var(--minion-bg-position, center 120px), center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, scroll, scroll, scroll;
}

@media (max-width: 600px) {
  .minion-theme {
    background-size: 100% 100%, clamp(240px, 92vw, 520px) auto, auto, auto, auto;
    --minion-bg-position: center 140px;
  }
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.75);
  overflow-x: auto;
  border-bottom: 1px solid #e0e6ed;
  position: sticky;
  top: 0;
  z-index: 9;
  backdrop-filter: blur(8px);
}

.tab-button {
  border: none;
  background: rgba(237, 242, 247, 0.7);
  color: #334e68;
  padding: 9px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tab-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(31, 41, 51, 0.12);
}

.tab-button.active {
  background: rgba(248, 216, 72, 0.8);
  color: #1f2933;
  box-shadow: 0 6px 14px rgba(248, 216, 72, 0.4);
}

.tabs-content {
  padding: 22px 20px 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel.entering {
  animation: panelFade 0.35s ease;
}

h2 {
  margin: 24px 0 12px;
  font-size: 18px;
}

.card {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--minion-shadow);
  margin-bottom: 16px;
  border: 1px solid rgba(36, 59, 85, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(31, 41, 51, 0.12);
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

input,
select,
button {
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #d9e2ec;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  background: rgba(255, 255, 255, 0.78);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--minion-yellow) 0%, #d9e2ec 100%);
  border: none;
  padding: 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--minion-yellow);
  border: 3px solid #2f3e4d;
  box-shadow: 0 6px 12px rgba(31, 41, 51, 0.2);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--minion-yellow);
  border: 3px solid #2f3e4d;
  box-shadow: 0 6px 12px rgba(31, 41, 51, 0.2);
  cursor: pointer;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--minion-blue);
  box-shadow: 0 0 0 3px rgba(47, 91, 137, 0.2);
}

button {
  background: linear-gradient(
    135deg,
    rgba(47, 91, 137, 0.82) 0%,
    rgba(33, 65, 98, 0.82) 100%
  );
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(33, 65, 98, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(33, 65, 98, 0.28);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 6px 12px rgba(33, 65, 98, 0.24);
}

.form-actions {
  display: flex;
  align-items: flex-end;
}

.form-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.controls-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.schedule-slots h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.slots-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2933;
  border: 1px solid rgba(217, 226, 236, 0.7);
  box-shadow: none;
}

.slots-chevron {
  font-size: 20px;
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.schedule-slots.collapsed .schedule-slots-body {
  display: none;
}

.schedule-slots.collapsed .slots-chevron {
  transform: rotate(0deg);
}

.schedule-hint {
  margin-top: 10px;
  color: var(--minion-muted);
  font-size: 12px;
}

.schedule-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.schedule-day-title {
  margin-bottom: 10px;
  color: var(--minion-muted);
  font-size: 13px;
}

input.invalid {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2);
}
.month-nav {
  display: flex;
  gap: 6px;
}

.month-nav button {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(
    135deg,
    rgba(248, 216, 72, 0.85) 0%,
    rgba(255, 210, 77, 0.85) 100%
  );
  color: #1f2933;
  box-shadow: 0 10px 16px rgba(248, 216, 72, 0.3);
}

.month-nav button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 20px rgba(248, 216, 72, 0.35);
}

.range-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.list-block {
  min-height: 60px;
}

.list-item {
  padding: 12px 0;
  border-bottom: 1px solid #edf2f7;
  transition: background 0.2s ease;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: rgba(248, 216, 72, 0.12);
  border-radius: 12px;
}

.list-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.action-button {
  background: rgba(241, 245, 249, 0.75);
  color: #1f2933;
  border: 1px solid #d9e2ec;
  box-shadow: none;
  padding: 6px 10px;
  font-size: 12px;
}

.action-button.danger {
  background: rgba(255, 227, 227, 0.8);
  color: #9b1c1c;
  border-color: #ffcccc;
}

.list-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.list-meta {
  color: var(--minion-muted);
  font-size: 13px;
}

.hidden {
  display: none;
}

.calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-header,
.calendar-body {
  display: grid;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  gap: 6px;
}

.calendar-header div {
  text-align: center;
  font-size: 12px;
  color: var(--minion-muted);
}

.calendar-cell {
  background: #f5f7fa;
  border: none;
  border-radius: 12px;
  padding: 12px 0;
  cursor: pointer;
  font-weight: 600;
  color: #334e68;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
}

.calendar-cell:hover:not(.empty):not(.selected) {
  transform: translateY(-2px);
  box-shadow: 0 8px 14px rgba(31, 41, 51, 0.12);
  background: #fff4c5;
}

.calendar-cell.marked {
  background: #ffe8cc;
}

.calendar-cell.marked::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f08c3a;
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
}

.calendar-cell.selected {
  background: #2f855a;
  color: #fff;
}

.calendar-cell.selected:hover {
  background: #2f855a;
  transform: translateY(-2px);
  box-shadow: 0 8px 14px rgba(47, 133, 90, 0.35);
}

.calendar-cell.selected::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 4px;
  border-radius: 10px;
}

.calendar-cell.weekend {
  background: #edf2ff;
}

.calendar-cell.weekend.selected {
  background: #2f855a;
  color: #fff;
}

.calendar-cell.today {
  border: 2px solid var(--minion-yellow);
  background: #fff9d6;
}

.calendar-cell.empty {
  background: transparent;
  cursor: default;
}

.calendar-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 8px 4px 12px;
  font-size: 13px;
  color: var(--minion-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d9e2ec;
}

.legend-dot.marked {
  background: #ffc875;
}

.legend-dot.selected {
  background: #2f855a;
}

.legend-dot.today {
  background: var(--minion-yellow);
}

.legend-dot.weekend {
  background: #9ab1ff;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1f2933;
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.2);
}

.toast.error {
  background: #c53030;
}

.toast.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  width: min(720px, 100%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #1f2933;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

@keyframes panelFade {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

