* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header__logo-link {
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s;
}

.header__logo-link:hover {
  opacity: 0.8;
}

.header__title {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.header__filename {
  font-size: 14px;
  color: #666;
  font-weight: 400;
  margin-left: 2px;
}

.header__nav {
  margin-top: 12px;
}

.header__nav-link {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  color: #4a90e2;
  text-decoration: none;
  background-color: #e3f2fd;
  border-radius: 4px;
  transition: all 0.2s;
}

.header__nav-link:hover {
  background-color: #4a90e2;
  color: #fff;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  line-height: 1.6;
  display: none;
}

.info__title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px 0;
}

.info__subtitle {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 24px 0 12px 0;
}

.info__text {
  margin: 0 0 12px 0;
  color: #555;
  font-size: 15px;
}

.info__list {
  margin: 12px 0;
  padding-left: 24px;
  color: #555;
  font-size: 15px;
}

.info__list li {
  margin-bottom: 8px;
}

.info__list code {
  background-color: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  color: #d32f2f;
}

.api-loader {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.api-loader__title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 20px 0;
}

.api-loader__settings {
  margin-bottom: 20px;
}

.api-loader__details {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 12px;
}

.api-loader__summary {
  cursor: pointer;
  font-weight: 500;
  color: #555;
  user-select: none;
}

.api-loader__summary:hover {
  color: #4a90e2;
}

.api-loader__settings-content {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.api-loader__field {
  margin-bottom: 12px;
}

.api-loader__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  margin-bottom: 6px;
}

.api-loader__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.api-loader__input:focus {
  outline: none;
  border-color: #4a90e2;
}

.api-loader__save-btn {
  padding: 8px 16px;
  background-color: #50c878;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.api-loader__save-btn:hover {
  background-color: #45b368;
}

.api-loader__hint {
  font-size: 12px;
  color: #888;
  margin: 8px 0 0 0;
}

.api-loader__form {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.api-loader__issue-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 15px;
  transition: border-color 0.2s;
}

.api-loader__issue-input:focus {
  outline: none;
  border-color: #4a90e2;
}

.api-loader__load-btn {
  padding: 12px 24px;
  background-color: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.api-loader__load-btn:hover {
  background-color: #357abd;
}

.api-loader__status {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  display: none;
}

.api-loader__status--success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.api-loader__status--error {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.api-loader__status--loading {
  background-color: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.divider {
  text-align: center;
  position: relative;
  margin: 20px 0;
}

.divider__text {
  display: inline-block;
  padding: 0 16px;
  background-color: #f5f5f5;
  color: #999;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #ddd;
}

.upload {
  background-color: #fff;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 2px dashed #ddd;
  transition: border-color 0.3s;
}

.upload:hover {
  border-color: #4a90e2;
}

.upload__input {
  display: none;
}

.upload__label {
  display: inline-block;
  padding: 12px 24px;
  background-color: #4a90e2;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.upload__label:hover {
  background-color: #357abd;
}

.controls {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;
}

.controls--visible {
  display: block;
}

.controls__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.controls__title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.controls__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.controls__summary {
  font-size: 13px;
  color: #888;
  margin-right: 8px;
}

.controls__summary--hidden {
  display: none;
}

.controls__button {
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  color: #555;
  cursor: pointer;
  transition: all 0.2s;
}

.controls__button:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
}

.controls__button--reset {
  color: #d32f2f;
  border-color: #d32f2f;
}

.controls__button--reset:hover {
  background-color: #d32f2f;
  color: #fff;
}

.controls__content {
  transition: all 0.3s ease;
  max-height: 2000px;
  overflow: hidden;
}

.controls__content--hidden {
  max-height: 0;
  opacity: 0;
}

.controls__group {
  margin-bottom: 20px;
}

.controls__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #555;
}

.controls__checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.controls__checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.controls__checkbox {
  cursor: pointer;
}

.controls__checkbox-label {
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.controls__dates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.controls__button--exclude-weekends {
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #4a90e2;
  border-radius: 4px;
  background-color: #fff;
  color: #4a90e2;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.controls__button--exclude-weekends:hover {
  background-color: #4a90e2;
  color: #fff;
}

.calendar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
}

.calendar__month {
  background-color: #fafafa;
  border-radius: 8px;
  padding: 16px;
  min-width: 280px;
}

.calendar__month-header {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  text-align: center;
}

.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.calendar__weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  padding: 4px;
}

.calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #333;
  background-color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.calendar__day:hover {
  background-color: #e3f2fd;
  border-color: #4a90e2;
}

.calendar__day--empty {
  background-color: transparent;
  cursor: default;
}

.calendar__day--empty:hover {
  background-color: transparent;
  border-color: transparent;
}

.calendar__day--weekend {
  background-color: #f5f5f5;
  color: #888;
}

.calendar__day--weekend:hover {
  background-color: #e0e0e0;
}

.calendar__day--excluded {
  background-color: #ffebee;
  color: #c62828;
  border-color: #ef5350;
  font-weight: 600;
}

.calendar__day--excluded:hover {
  background-color: #ffcdd2;
  border-color: #e53935;
}

.calendar__day--out-of-range {
  background-color: #fafafa;
  color: #ccc;
  cursor: not-allowed;
}

.calendar__day--out-of-range:hover {
  background-color: #fafafa;
  border-color: transparent;
}

.timeline {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;
}

.timeline--visible {
  display: block;
}

.timeline__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
}

.timeline__canvas {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 10px;
}

.timeline__bar {
  display: flex;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.timeline__segment {
  position: relative;
  transition: opacity 0.3s, filter 0.3s;
  cursor: pointer;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.timeline__segment:hover {
  opacity: 0.85;
}

.timeline__segment--dimmed {
  filter: grayscale(100%) brightness(1.2);
  opacity: 0.4;
}

.timeline__segment--weekend {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0, 0, 0, 0.05) 10px,
    rgba(0, 0, 0, 0.05) 20px
  );
}

.timeline__segment--excluded-day {
  opacity: 0.3;
  position: relative;
}

.timeline__segment--excluded-day::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 5px,
    rgba(255, 0, 0, 0.1) 5px,
    rgba(255, 0, 0, 0.1) 10px
  );
}

.timeline__segment-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  pointer-events: none;
}

.timeline__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.timeline__legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.timeline__legend-item:hover {
  background-color: #f5f5f5;
}

.timeline__legend-color {
  width: 20px;
  height: 20px;
  border-radius: 3px;
}

.timeline__legend-label {
  font-size: 14px;
  color: #555;
}

.tooltip {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  pointer-events: none;
  z-index: 1000;
  max-width: 300px;
  display: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tooltip--visible {
  display: block;
}

.tooltip__title {
  font-weight: 600;
  margin-bottom: 4px;
}

.tooltip__content {
  font-size: 12px;
  line-height: 1.4;
}

.statistics {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;
}

.statistics--visible {
  display: block;
}

.statistics__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
}

.statistics__summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #e3f2fd;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.statistics__summary-label {
  font-size: 14px;
  color: #1976d2;
  font-weight: 500;
}

.statistics__summary-value {
  font-size: 18px;
  font-weight: 700;
  color: #0d47a1;
}

.statistics__table-wrapper {
  overflow-x: auto;
}

.statistics__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.statistics__header-row {
  background-color: #f5f5f5;
}

.statistics__header {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid #e0e0e0;
}

.statistics__header:not(:first-child) {
  text-align: right;
}

.statistics__row {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.statistics__row:hover {
  background-color: #fafafa;
}

.statistics__cell {
  padding: 10px 12px;
  color: #333;
}

.statistics__cell--status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.statistics__cell--number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.statistics__status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.files-list {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;
}

.files-list__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.files-list__title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.files-list__upload-btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: #4a90e2;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.files-list__upload-btn:hover {
  background-color: #357abd;
}

.files-list__empty {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.files-list__empty p {
  margin-bottom: 16px;
  font-size: 16px;
}

.files-list__upload-link {
  display: inline-block;
  padding: 10px 20px;
  background-color: #4a90e2;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.2s;
}

.files-list__upload-link:hover {
  background-color: #357abd;
}

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

.files-list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background-color: #f9f9f9;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.files-list__item:hover {
  background-color: #f0f0f0;
}

.files-list__item-main {
  flex: 1;
}

.files-list__item-name {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.files-list__item-name:hover {
  color: #4a90e2;
}

.files-list__item-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #666;
}

.files-list__item-delete {
  padding: 6px 12px;
  background-color: transparent;
  color: #d32f2f;
  border: 1px solid #d32f2f;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.files-list__item-delete:hover {
  background-color: #d32f2f;
  color: #fff;
}
