.shifter-wrap {
  max-width: 560px;
  margin: 0 auto;
}

.shifter-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 18px;
}

.shifter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shifter-card--denied {
  text-align: center;
  padding: 32px 24px;
}

.shifter-denied-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.shifter-denied-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.shifter-user {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 800;
}

.shifter-user img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.shifter-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.shifter-field--full {
  grid-column: 1 / -1;
}

.shifter-input,
.shifter-scope-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2, #f6f6fa);
  padding: 13px 14px;
  font: inherit;
  font-size: 15px;
  outline: none;
}

.shifter-input:focus,
.shifter-scope-input:focus {
  border-color: var(--accent);
}

.shifter-scope-input {
  resize: vertical;
  min-height: 104px;
}

.shifter-manual {
  display: none;
  margin-top: 10px;
}

.shifter-manual.show {
  display: block;
}

.shifter-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.shifter-main-btn,
.shifter-secondary-btn,
.shifter-break-btn,
.shifter-close-btn,
.shifter-filter-clear {
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
}

.shifter-main-btn {
  min-width: 156px;
  height: 58px;
  border-radius: 16px;
  color: #fff;
  font-size: 20px;
}

.shifter-main-btn.is-start {
  background: #22c55e;
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.22);
}

.shifter-main-btn.is-finish {
  background: #ef4444;
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.22);
}

.shifter-break-btn {
  min-width: 120px;
  height: 58px;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 16px;
}

.shifter-break-btn.is-active {
  background: #f59e0b;
  color: #fff;
}

.shifter-secondary-btn {
  height: 58px;
  padding: 0 18px;
  border-radius: 16px;
  background: rgba(255, 130, 0, 0.08);
  color: var(--accent);
  border: 1px solid rgba(255, 130, 0, 0.24);
  font-size: 14px;
}

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

.shifter-active,
.shifter-state {
  width: 100%;
  text-align: center;
  font-size: 14px;
}

.shifter-active {
  white-space: pre-line;
  line-height: 1.55;
}

.shifter-state {
  color: var(--text-muted);
}

.shifter-modal[hidden] {
  display: none;
}

.shifter-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.shifter-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.shifter-modal-card {
  position: relative;
  width: min(760px, 100% - 24px);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.shifter-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.shifter-modal-head h2 {
  margin: 0;
  font-size: 20px;
}

.shifter-total-hours {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.shifter-close-btn {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 130, 0, 0.08);
  color: var(--accent);
  border: 1px solid rgba(255, 130, 0, 0.22);
}

.shifter-filters {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fafafa;
}

.shifter-filter-field {
  display: grid;
  gap: 5px;
}

.shifter-filter-field span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.shifter-filter-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
}

.shifter-filter-clear {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  font-size: 13px;
}

.shifter-history-list {
  display: grid;
  gap: 10px;
}

.shifter-row {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: var(--surface);
}

.shifter-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.shifter-row-title {
  font-weight: 700;
  font-size: 15px;
}

.shifter-pill {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 130, 0, 0.1);
  border: 1px solid rgba(255, 130, 0, 0.2);
}

.shifter-meta {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 12px;
}

.shifter-meta div {
  font-size: 13px;
  color: var(--text-muted);
}

.shifter-meta strong {
  display: block;
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

@media (max-width: 560px) {
  .shifter-card {
    padding: 20px;
  }
  .shifter-form-grid,
  .shifter-filters {
    grid-template-columns: 1fr;
  }
  .shifter-main-btn,
  .shifter-break-btn,
  .shifter-secondary-btn {
    width: 100%;
  }
  .shifter-meta {
    grid-template-columns: 1fr;
  }
  .shifter-filter-clear {
    width: 100%;
  }
}
